Skip to content

Commit 035be24

Browse files
author
Andrew Kern
committed
a few clean ups
1 parent 95b46a3 commit 035be24

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

ancPopSizeRegressionExample.ipynb

+11-7
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
"outputs": [],
6262
"source": [
63-
"!conda install scikit-learn"
63+
"!conda install scikit-learn --yes"
6464
]
6565
},
6666
{
@@ -115,7 +115,7 @@
115115
},
116116
"outputs": [],
117117
"source": [
118-
"pip install scikit-allel"
118+
"!pip install scikit-allel"
119119
]
120120
},
121121
{
@@ -158,7 +158,7 @@
158158
},
159159
"outputs": [],
160160
"source": [
161-
"#simulate under the equilibrium model -- could also do this with ms\n",
161+
"#simulate under the various two epoch models where ancient population size is determined at random from list made above\n",
162162
"!./ms 20 10000 -t 100 -r 100 10000 -en 0.5 1 tbs < random_pop_size.sizes > random_pop_size.msOut"
163163
]
164164
},
@@ -174,7 +174,9 @@
174174
{
175175
"cell_type": "code",
176176
"execution_count": null,
177-
"metadata": {},
177+
"metadata": {
178+
"collapsed": true
179+
},
178180
"outputs": [],
179181
"source": [
180182
"from msTools import *\n",
@@ -244,7 +246,9 @@
244246
{
245247
"cell_type": "code",
246248
"execution_count": null,
247-
"metadata": {},
249+
"metadata": {
250+
"collapsed": true
251+
},
248252
"outputs": [],
249253
"source": [
250254
"from sklearn.ensemble import RandomForestRegressor\n",
@@ -305,7 +309,7 @@
305309
"cell_type": "markdown",
306310
"metadata": {},
307311
"source": [
308-
"Not too shabby! Let's look at some quantitative measures of this fit. In particular we will look at the mean square error (lower is better) and the variance explained by the regression (a.k.a. R^2 -- 1 would be perfect)"
312+
"Not too shabby! Let's look at some quantitative measures of this fit. In particular we will look at the mean squared error (lower is better) and the variance explained by the regression (a.k.a. R^2 -- 1 would be perfect)"
309313
]
310314
},
311315
{
@@ -323,7 +327,7 @@
323327
}
324328
],
325329
"source": [
326-
"print 'mean square error = ',np.mean((preds-Y_test)**2)\n",
330+
"print 'mean squared error = ',np.mean((preds-Y_test)**2)\n",
327331
"print 'R^2 = ', clf.score(X_test, Y_test)"
328332
]
329333
},

0 commit comments

Comments
 (0)