1

I am currently trying to train a Random Forest classifier on Collect Earth Online data to predict certain landcover classifications based on R, G, B, and NIR bands from Sentinel 2 (Google Earth Engine).

The dataset I'm using has access to around 100K points, however, Earth Engine seems to only accept 10K points which leads to about 85% accuracy with the smile random forest classifier.

To try to use the entire dataset, I exported the Sentinel enriched Earth Engine data onto my computer to feed into the sklearn random forest algorithm. Unfortunately, the sklearn algorithm has about 56% accuracy.

Is there a way for me to use the smile classifier that is available on Earth Engine locally on my computer?

1
  • The Random Forest algorithm (vanilla) is very simple and there are few parameters that can create significant differences in two different implementations. The key hyperparameters that can affect performance are: number of trees, number of variables in each split node, maximum depth of trees, and 'out of bag' ratio. I think all of these hyperparameters can be tuned in scikitlearn (and also in other libraries like randomForest R, or Decision Forest Tensorflow). Be sure to set these hyperparameters the same on all implementations to get similar results.
    – sermomon
    Nov 26, 2022 at 20:57

1 Answer 1

0

I do not know how to apply the Earth Engine implementation of smileRandomForest locally. However, I've used both the EE and sklearn classifiers many times, and find a similar accuracy on both. I'm worried you might not have sklearn set up correctly. I recommend experimenting with both by setting the hyperparameters explicitly: bag fraction, maximum depth, etc.

Further, I've found EE to accept up to around 120 MB of data in CSV file that I can then train the smileRandomForest classifier with. For my data, this is about 60-80k rows, with 100+ features (columns). With such a large table, the classifier will time out before displaying results on your screen, you must export the classified images to an ImageCollection asset or as a file to a GCS bucket.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.