|
6 | 6 | "source": [
|
7 | 7 | "# Extracting training data from the ODC <img align=\"right\" src=\"../../Supplementary_data/dea_logo.jpg\">\n",
|
8 | 8 | "\n",
|
9 |
| - "* [**Sign up to the DEA Sandbox**](https://docs.dea.ga.gov.au/setup/sandbox.html) to run this notebook interactively from a browser\n", |
| 9 | + "* [**Sign up to the DEA Sandbox**](https://docs.dea.ga.gov.au/setup/Sandbox/sandbox.html) to run this notebook interactively from a browser\n", |
10 | 10 | "* **Compatibility:** Notebook currently compatible with the `DEA Sandbox` environment\n",
|
11 | 11 | "* **Products used:** \n",
|
12 |
| - "[ga_ls8c_nbart_gm_cyear_3](https://explorer.sandbox.dea.ga.gov.au/products/ga_ls8c_nbart_gm_cyear_3),\n", |
13 |
| - "[ga_ls_fc_pc_cyear_3](https://explorer.sandbox.dea.ga.gov.au/products/ga_ls_fc_pc_cyear_3)" |
| 12 | + "[ga_ls8c_nbart_gm_cyear_3](https://explorer.dea.ga.gov.au/products/ga_ls8c_nbart_gm_cyear_3),\n", |
| 13 | + "[ga_ls_fc_pc_cyear_3](https://explorer.dea.ga.gov.au/products/ga_ls_fc_pc_cyear_3)" |
14 | 14 | ]
|
15 | 15 | },
|
16 | 16 | {
|
|
23 | 23 | "\n",
|
24 | 24 | "When creating training labels, be sure to capture the **spectral variability** of the class, and to use imagery from the time period you want to classify (rather than relying on basemap composites). Another common problem with training data is **class imbalance**. This can occur when one of your classes is relatively rare and therefore the rare class will comprise a smaller proportion of the training set. When imbalanced data is used, it is common that the final classification will under-predict less abundant classes relative to their true proportion.\n",
|
25 | 25 | "\n",
|
26 |
| - "There are many platforms to use for gathering training labels, the best one to use depends on your application. GIS platforms are great for collection training data as they are highly flexible and mature platforms; [Geo-Wiki](https://www.geo-wiki.org/) and [Collect Earth Online](https://collect.earth/home) are two open-source websites that may also be useful depending on the reference data strategy employed. Alternatively, there are many pre-existing training datasets on the web that may be useful, e.g. [Radiant Earth](https://www.radiant.earth/) manages a growing number of reference datasets for use by anyone.\n" |
| 26 | + "There are many platforms to use for gathering training labels, the best one to use depends on your application. GIS platforms are great for collection training data as they are highly flexible and mature platforms; [Geo-Wiki](https://www.geo-wiki.org/) and [Collect Earth Online](https://www.collect.earth/) are two open-source websites that may also be useful depending on the reference data strategy employed. Alternatively, there are many pre-existing training datasets on the web that may be useful, e.g. [Radiant Earth](https://www.radiant.earth/) manages a growing number of reference datasets for use by anyone.\n" |
27 | 27 | ]
|
28 | 28 | },
|
29 | 29 | {
|
|
309 | 309 | " ds = ds.mean('time')\n",
|
310 | 310 | " return ds\n",
|
311 | 311 | "\n",
|
312 |
| - "Below, we will define a more complicated feature layer function than the brief example shown above. We will load satellite bands and the ternary Median Abosolute Deviation dataset from the [Landsat 8 geomedian](https://explorer.sandbox.dea.ga.gov.au/products/ga_ls8c_nbart_gm_cyear_3) product, calculate some additional band indices, and finally append fractional cover percentiles for the photosynthetic vegetation band from the same year: [fc_percentile_albers_annual](https://explorer.sandbox.dea.ga.gov.au/products/fc_percentile_albers_annual/extents)." |
| 312 | + "Below, we will define a more complicated feature layer function than the brief example shown above. We will load satellite bands and the ternary Median Abosolute Deviation dataset from the [Landsat 8 geomedian](https://explorer.dea.ga.gov.au/products/ga_ls8c_nbart_gm_cyear_3) product, calculate some additional band indices, and finally append fractional cover percentiles for the photosynthetic vegetation band from the same year: [fc_percentile_albers_annual](https://explorer.dea.ga.gov.au/products/fc_percentile_albers_annual/extents)." |
313 | 313 | ]
|
314 | 314 | },
|
315 | 315 | {
|
|
356 | 356 | },
|
357 | 357 | {
|
358 | 358 | "cell_type": "code",
|
359 |
| - "execution_count": 9, |
| 359 | + "execution_count": null, |
360 | 360 | "metadata": {},
|
361 |
| - "outputs": [ |
362 |
| - { |
363 |
| - "name": "stdout", |
364 |
| - "output_type": "stream", |
365 |
| - "text": [ |
366 |
| - "Collecting training data in parallel mode\n" |
367 |
| - ] |
368 |
| - }, |
369 |
| - { |
370 |
| - "data": { |
371 |
| - "application/vnd.jupyter.widget-view+json": { |
372 |
| - "model_id": "d28cdda5ed0941c4907430eb3165b157", |
373 |
| - "version_major": 2, |
374 |
| - "version_minor": 0 |
375 |
| - }, |
376 |
| - "text/plain": [ |
377 |
| - " 0%| | 0/430 [00:00<?, ?it/s]" |
378 |
| - ] |
379 |
| - }, |
380 |
| - "metadata": {}, |
381 |
| - "output_type": "display_data" |
382 |
| - }, |
383 |
| - { |
384 |
| - "name": "stdout", |
385 |
| - "output_type": "stream", |
386 |
| - "text": [ |
387 |
| - "Percentage of possible fails after run 1 = 0.0 %\n", |
388 |
| - "Removed 0 rows wth NaNs &/or Infs\n", |
389 |
| - "Output shape: (430, 14)\n", |
390 |
| - "CPU times: user 1.63 s, sys: 169 ms, total: 1.8 s\n", |
391 |
| - "Wall time: 8min 35s\n" |
392 |
| - ] |
393 |
| - } |
394 |
| - ], |
| 361 | + "outputs": [], |
395 | 362 | "source": [
|
396 | 363 | "%%time\n",
|
397 | 364 | "column_names, model_input = collect_training_data(\n",
|
|
489 | 456 | "**Contact:** If you need assistance, please post a question on the [Open Data Cube Slack channel](http://slack.opendatacube.org/) or on the [GIS Stack Exchange](https://gis.stackexchange.com/questions/ask?tags=open-data-cube) using the `open-data-cube` tag (you can view previously asked questions [here](https://gis.stackexchange.com/questions/tagged/open-data-cube)).\n",
|
490 | 457 | "If you would like to report an issue with this notebook, you can file one on [Github](https://github.com/GeoscienceAustralia/dea-notebooks).\n",
|
491 | 458 | "\n",
|
492 |
| - "**Last modified:** May 2022\n", |
| 459 | + "**Last modified:** December 2023\n", |
493 | 460 | "\n",
|
494 | 461 | "**Compatible datacube version:** "
|
495 | 462 | ]
|
|
0 commit comments