I got confused about accuracy assessment and validation. What is the difference? do we need to do both? usually, I just do the accuracy assessment with different points that I use for classification. Hope you could explain about it. Anyway thank you for your great tutorials, I learn a lot from it.
very usefull professor Wu. I would like to ask you, How can I do a similar process but with an external source of points as reference for accuraccy assessment?
@@giswqs I am trying to use the boundary (rectangle) geometry to extract the study area and then train the area which is approximately 9 GB in local computer. I could not upload that in my GGE account-it gives me the error so I used its extent to select the same area from the map and then train it. But it only selects a smaller part/chip of it and train the area. When I download the raster- it is only around 178 KB. I kept scale to 1 as I am using NAIP imagery.( I also tried using 17 scale) Would really appreciate your guidance on it. Thank you!
@@giswqs Syntax: region = ee.Geometry.Rectangle([-85.46293227354874, 30.522437102328066,-84.1487070857995 ,30.08361801814346 ]) dataset = ee.ImageCollection('USDA/NAIP/DOQQ').filter(ee.Filter.date('2017-01-01', '2018-12-31')).filterBounds(region).first() 1. Select training samples:- points = nlcd.sample(**{ 'region': dataset.geometry(), 'scale': 17, 'numPixels': 100000, 'seed': 0, 'geometries': True # Set this to False to ignore geometries }) Map.addLayer(points, {}, 'training', False) 2. Split the sample:- label = 'landcover' # Overlay the points on the imagery to get training. sample = dataset.select(bands).sampleRegions(**{ 'collection': points, 'properties': [label], 'scale': 17 }) # Adds a column of deterministic pseudorandom numbers. sample = sample.randomColumn() split = 0.7 training = sample.filter(ee.Filter.lt('random', split)) validation = sample.filter(ee.Filter.gte('random', split)) 3. Classifier:- classifier = ee.Classifier.smileRandomForest(10).train(training, label, bands) Export the result:- import os out_dir = os.path.join(os.path.expanduser('~'), 'Downloads') out_file = os.path.join(out_dir, 'landcoverfinalfinalforNAIP.tif') geemap.ee_export_image_to_drive(landcover, description='landcover', folder='export', scale=1) These are the major syntax used for the classification. Can we export the result around 9 GB directly to our local computer without having to store in google drive? I tried that also but did not help.
Very useful! Please keep going.
I got confused about accuracy assessment and validation. What is the difference? do we need to do both? usually, I just do the accuracy assessment with different points that I use for classification. Hope you could explain about it. Anyway thank you for your great tutorials, I learn a lot from it.
Very informative
very usefull professor Wu. I would like to ask you, How can I do a similar process but with an external source of points as reference for accuraccy assessment?
What is the significance behind calculating the two matrices (train accuracy and validation)? what are the comparison criteria?
Very very useful sir. I want to know how the random forest model apply in suspended sediment concentration measurements ?
Upto what sized raster we can train and extract by supervised algorithms on gge? I tried to train 9 GB, but it gives the error.
What error? See developers.google.com/earth-engine/guides/classification
@@giswqs I am trying to use the boundary (rectangle) geometry to extract the study area and then train the area which is approximately 9 GB in local computer. I could not upload that in my GGE account-it gives me the error so I used its extent to select the same area from the map and then train it. But it only selects a smaller part/chip of it and train the area. When I download the raster- it is only around 178 KB. I kept scale to 1 as I am using NAIP imagery.( I also tried using 17 scale) Would really appreciate your guidance on it. Thank you!
@@ritikaprasai5118 How did you select NAIP imagery? See developers.google.com/earth-engine/datasets/catalog/USDA_NAIP_DOQQ
@@giswqs
Syntax:
region = ee.Geometry.Rectangle([-85.46293227354874, 30.522437102328066,-84.1487070857995 ,30.08361801814346 ])
dataset = ee.ImageCollection('USDA/NAIP/DOQQ').filter(ee.Filter.date('2017-01-01', '2018-12-31')).filterBounds(region).first()
1. Select training samples:-
points = nlcd.sample(**{
'region': dataset.geometry(),
'scale': 17,
'numPixels': 100000,
'seed': 0,
'geometries': True # Set this to False to ignore geometries
})
Map.addLayer(points, {}, 'training', False)
2. Split the sample:-
label = 'landcover'
# Overlay the points on the imagery to get training.
sample = dataset.select(bands).sampleRegions(**{
'collection': points,
'properties': [label],
'scale': 17
})
# Adds a column of deterministic pseudorandom numbers.
sample = sample.randomColumn()
split = 0.7
training = sample.filter(ee.Filter.lt('random', split))
validation = sample.filter(ee.Filter.gte('random', split))
3. Classifier:-
classifier = ee.Classifier.smileRandomForest(10).train(training, label, bands)
Export the result:-
import os
out_dir = os.path.join(os.path.expanduser('~'), 'Downloads')
out_file = os.path.join(out_dir, 'landcoverfinalfinalforNAIP.tif')
geemap.ee_export_image_to_drive(landcover, description='landcover', folder='export', scale=1)
These are the major syntax used for the classification. Can we export the result around 9 GB directly to our local computer without having to store in google drive? I tried that also but did not help.
Great one as usual from my Sifu.
Please prof. For better accuracy do you recommend training pixels with points or polygons.
Thanks
can you project another country
Yes, you can.