You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: welcome.md
+121
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,127 @@ Here is what sets it apart:
19
19
***Batteries included**: Includes probability distributions, Gaussian processes, ABC, SMC and much more. It integrates nicely with {doc}`ArviZ <arviz:index>` for visualizations and diagnostics, as well as {doc}`Bambi <bambi:index>` for high-level mixed-effect models.
20
20
***Community focused**: Ask questions on [discourse](https://discourse.pymc.io), join [MeetUp events](https://meetup.com/pymc-online-meetup/), follow us on [Twitter](https://twitter.com/pymc_devs), and start [contributing](https://www.pymc.io/projects/docs/en/latest/contributing/index.html).
21
21
22
+
## Example from Linear Regression
23
+
24
+
This example demonstrates how to perform Bayesian inference for a linear regression model to predict plant growth based on environmental factors.
25
+
26
+
Plant growth can be influenced by multiple factors, and understanding these relationships is crucial for optimizing agricultural practices.
27
+
28
+
```python
29
+
import pymc as pm
30
+
31
+
# Taking draws from a normal distribution
32
+
seed =42
33
+
x_dist = pm.Normal.dist(shape=(100, 3))
34
+
x_data = pm.draw(x_dist, random_seed=seed)
35
+
36
+
# Independent Variables:
37
+
# Sunlight Hours: Number of hours the plant is exposed to sunlight daily.
38
+
# Water Amount: Daily water amount given to the plant (in milliliters).
39
+
# Soil Nitrogen Content: Percentage of nitrogen content in the soil.
40
+
41
+
42
+
# Dependent Variable:
43
+
# Plant Growth (y): Measured as the increase in plant height (in centimeters) over a certain period.
44
+
45
+
46
+
# Define coordinate values for all dimensions of the data
0 commit comments