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: docs/tutorial/activities.ipynb
+48-33Lines changed: 48 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -26,14 +26,15 @@
26
26
"cell_type": "code",
27
27
"execution_count": null,
28
28
"metadata": {
29
-
"collapsed": true
29
+
"collapsed": false
30
30
},
31
31
"outputs": [],
32
32
"source": [
33
33
"import warnings\n",
34
34
"warnings.simplefilter('ignore')\n",
35
35
"\n",
36
36
"from numpy.random import seed\n",
37
+
"from scipy import stats\n",
37
38
"from matplotlib import pyplot\n",
38
39
"import seaborn\n",
39
40
"\n",
@@ -127,7 +128,7 @@
127
128
"cell_type": "markdown",
128
129
"metadata": {},
129
130
"source": [
130
-
"### Fitting distribution\n",
131
+
"### Fitting distributions\n",
131
132
"Fitting distributions to data follows a similar pattern."
132
133
]
133
134
},
@@ -143,6 +144,25 @@
143
144
"paramnormal.activity.fit('beta', data)"
144
145
]
145
146
},
147
+
{
148
+
"cell_type": "markdown",
149
+
"metadata": {},
150
+
"source": [
151
+
"Equivalent command to perform the same fits in raw scipy is shown below:"
152
+
]
153
+
},
154
+
{
155
+
"cell_type": "code",
156
+
"execution_count": null,
157
+
"metadata": {
158
+
"collapsed": false
159
+
},
160
+
"outputs": [],
161
+
"source": [
162
+
"# constrained loc and scale\n",
163
+
"stats.beta.fit(data, floc=0, fscale=1)"
164
+
]
165
+
},
146
166
{
147
167
"cell_type": "markdown",
148
168
"metadata": {},
@@ -165,8 +185,7 @@
165
185
"cell_type": "markdown",
166
186
"metadata": {},
167
187
"source": [
168
-
"### Plotting\n",
169
-
"There is very limited plotting functionality built into paramnormal. For the time being, we just plot the probability distribution function (PDF), and offload everything else to the seaborn module if it's available."
"# constrained beta and scale, unconstrained loc\n",
200
+
"stats.beta.fit(data, f1=2, fscale=1)"
182
201
]
183
202
},
184
203
{
185
204
"cell_type": "markdown",
186
205
"metadata": {},
187
206
"source": [
188
-
"You can plot on an existing figure through the `ax` argument and control the line style through `line_opts`."
207
+
"### Plotting\n",
208
+
"There is very limited plotting functionality built into paramnormal.\n",
209
+
"The probability distribution function (PDF) is plotted by default, but any other method of the distributions can be plotted by specifying the ``which`` parameters."
0 commit comments