Skip to content

Commit 2fcfb93

Browse files
committed
Improve train model notebook
1 parent 36c1950 commit 2fcfb93

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

TrainModel.ipynb

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"cell_type": "markdown",
132132
"metadata": {},
133133
"source": [
134-
"We call the fit function to train the classifier on the training data. This will save the best weights at the provided location during the training folds."
134+
"We optionally subset the data, to smoke test"
135135
]
136136
},
137137
{
@@ -153,16 +153,16 @@
153153
" idx = np.random.choice(len(X), n_samples, replace=False)\n",
154154
" X, Y, pid, T = X[idx], Y[idx], pid[idx], T[idx]\n",
155155
" \n",
156-
" return X, Y, pid, T"
156+
" return X, Y, pid, T\n",
157+
"\n",
158+
"# X, Y, pid, T = subset_data(X, Y, pid, T, None, 10)"
157159
]
158160
},
159161
{
160-
"cell_type": "code",
161-
"execution_count": null,
162+
"cell_type": "markdown",
162163
"metadata": {},
163-
"outputs": [],
164164
"source": [
165-
"# X, Y, pid, T = subset_data(X, Y, pid, T, None, 10)"
165+
"We call the fit function to train the classifier on the training data. This will save the best weights at the provided location during the training folds."
166166
]
167167
},
168168
{
@@ -171,7 +171,7 @@
171171
"metadata": {},
172172
"outputs": [],
173173
"source": [
174-
"classifier.fit(X, Y, pid, T, f\"models/c24_rw_{datetime.now().strftime('%Y%m%d')}.pt\", n_splits=5)"
174+
"classifier.fit(X, Y, pid, T, f\"models/c24_rw_{datetime.now().strftime('%Y%m%d')}.pt\", n_splits=1)"
175175
]
176176
},
177177
{
@@ -298,15 +298,6 @@
298298
"source": [
299299
"p = plotTimeSeries(y)"
300300
]
301-
},
302-
{
303-
"cell_type": "code",
304-
"execution_count": null,
305-
"metadata": {},
306-
"outputs": [],
307-
"source": [
308-
"p = plotTimeSeries(loaded_classifier.predict_from_frame(data, 100, False))"
309-
]
310301
}
311302
],
312303
"metadata": {

0 commit comments

Comments
 (0)