|
6 | 6 | "metadata": {},
|
7 | 7 | "outputs": [],
|
8 | 8 | "source": [
|
9 |
| - "%pip install srai[torch]" |
| 9 | + "%pip install srai[torch] \"xgboost<3\" \"annoy<2\"" |
10 | 10 | ]
|
11 | 11 | },
|
12 | 12 | {
|
|
33 | 33 | "with zipfile.ZipFile('../../data/trips_hexes.zip', \"r\") as zf:\n",
|
34 | 34 | " for member in tqdm(zf.infolist(), desc=\"\"):\n",
|
35 | 35 | " try:\n",
|
36 |
| - " zf.extract(member, 'data')\n", |
| 36 | + " zf.extract(member, '../../data/')\n", |
37 | 37 | " except zipfile.error:\n",
|
38 | 38 | " pass"
|
39 | 39 | ]
|
|
238 | 238 | {
|
239 | 239 | "cell_type": "code",
|
240 | 240 | "execution_count": null,
|
241 |
| - "metadata": {}, |
| 241 | + "metadata": { |
| 242 | + "scrolled": false |
| 243 | + }, |
242 | 244 | "outputs": [],
|
243 | 245 | "source": [
|
244 | 246 | "buffered_regions = ring_buffer_h3_regions_gdf(regions_gdf=portugal_h3_regions, distance=neighbours_distance)\n",
|
|
354 | 356 | "cell_type": "code",
|
355 | 357 | "execution_count": null,
|
356 | 358 | "metadata": {
|
357 |
| - "scrolled": false |
| 359 | + "scrolled": true |
358 | 360 | },
|
359 | 361 | "outputs": [],
|
360 | 362 | "source": [
|
|
397 | 399 | ")"
|
398 | 400 | ]
|
399 | 401 | },
|
400 |
| - { |
401 |
| - "cell_type": "code", |
402 |
| - "execution_count": null, |
403 |
| - "metadata": {}, |
404 |
| - "outputs": [], |
405 |
| - "source": [ |
406 |
| - "import matplotlib.pyplot as plt\n", |
407 |
| - "\n", |
408 |
| - "fig = plt.figure(figsize=(14,9))\n", |
409 |
| - "ax = fig.add_subplot(111, \n", |
410 |
| - " projection='3d')\n", |
411 |
| - " \n", |
412 |
| - "for idx in pca_embeddings.index:\n", |
413 |
| - " ax.scatter(pca_embeddings.loc[idx][0],\n", |
414 |
| - " pca_embeddings.loc[idx][1],\n", |
415 |
| - " pca_embeddings.loc[idx][2],\n", |
416 |
| - " s=60)\n", |
417 |
| - "\n", |
418 |
| - "ax.set_xlabel(\"PC1\", \n", |
419 |
| - " fontsize=12)\n", |
420 |
| - "ax.set_ylabel(\"PC2\", \n", |
421 |
| - " fontsize=12)\n", |
422 |
| - "ax.set_zlabel(\"PC3\", \n", |
423 |
| - " fontsize=12)\n", |
424 |
| - " \n", |
425 |
| - "ax.view_init(30, 125)\n", |
426 |
| - "plt.title(\"3D PCA plot\")\n", |
427 |
| - "plt.show()" |
428 |
| - ] |
429 |
| - }, |
430 | 402 | {
|
431 | 403 | "cell_type": "code",
|
432 | 404 | "execution_count": null,
|
|
723 | 695 | "\n",
|
724 | 696 | "trainer_kwargs = {\n",
|
725 | 697 | " # \"max_epochs\": 50, # uncomment for a longer training\n",
|
726 |
| - " \"max_epochs\": 25,\n", |
| 698 | + " \"max_epochs\": 5,\n", |
727 | 699 | " # \"accelerator\": \"cpu\",\n",
|
728 | 700 | "}\n",
|
729 | 701 | "\n",
|
|
940 | 912 | "name": "python",
|
941 | 913 | "nbconvert_exporter": "python",
|
942 | 914 | "pygments_lexer": "ipython3",
|
943 |
| - "version": "3.11.4" |
| 915 | + "version": "3.10.9" |
944 | 916 | }
|
945 | 917 | },
|
946 | 918 | "nbformat": 4,
|
|
0 commit comments