|
131 | 131 | "cell_type": "markdown", |
132 | 132 | "metadata": {}, |
133 | 133 | "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" |
135 | 135 | ] |
136 | 136 | }, |
137 | 137 | { |
|
153 | 153 | " idx = np.random.choice(len(X), n_samples, replace=False)\n", |
154 | 154 | " X, Y, pid, T = X[idx], Y[idx], pid[idx], T[idx]\n", |
155 | 155 | " \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)" |
157 | 159 | ] |
158 | 160 | }, |
159 | 161 | { |
160 | | - "cell_type": "code", |
161 | | - "execution_count": null, |
| 162 | + "cell_type": "markdown", |
162 | 163 | "metadata": {}, |
163 | | - "outputs": [], |
164 | 164 | "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." |
166 | 166 | ] |
167 | 167 | }, |
168 | 168 | { |
|
171 | 171 | "metadata": {}, |
172 | 172 | "outputs": [], |
173 | 173 | "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)" |
175 | 175 | ] |
176 | 176 | }, |
177 | 177 | { |
|
298 | 298 | "source": [ |
299 | 299 | "p = plotTimeSeries(y)" |
300 | 300 | ] |
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 | | - ] |
310 | 301 | } |
311 | 302 | ], |
312 | 303 | "metadata": { |
|
0 commit comments