Google Earth Engine Random Forest Classifier

Hello to everyone, I am Gabriele and I tried to create a scrip for surveying (using Google Earth Engine). Precisely, I am using google earth engine to classify land cover.
I found a problem using the ‘Random Forest Classifier’. My purpose is to get a result (see the row ‘gridcoll_classifier’ or the image below) with a value between 0 and 1, but I got binary values only!
I attached the whole code right here:

var gridcoll = ee.FeatureCollection('users/gabrielenicolanapoli/gridcoll_merged_modified');

var withRandom = gridcoll.randomColumn('random');

var split = 0.7; //70% training, 30% testing.
var trainingPartition = withRandom.filter('random', split));
var testingPartition = withRandom.filter(ee.Filter.gte('random', split));


//Filtering out the null property values and try again.
//var trainingNoNulls = trainingPartition.filter(ee.Filter.notNull(trainingPartition.propertyNames()));

var ClassProperty = 'bool_str';

//Training the classifer and applying it with the filtered training collection.
var gridcoll_classifier = ee.Classifier.smileRandomForest(20).train({
  features: trainingPartition,
  classProperty: ClassProperty,
  inputProperties: ['S_mean', 'S_std']
print('Gridcoll Classifier', gridcoll_classifier);

var test = testingPartition.classify(gridcoll_classifier, 'gridcoll_classifier');
print('Gridcoll_test', test);

And the image with the script and the resulting asset…:

does anyone know a way to get a value including the 0 and 1?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.