Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

242
Vistas
Google Earth Engine Random Forest Classifier

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');

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

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

print(trainingPartition)

//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…:

1

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You need to set the output mode of the classifier. The default for the smileRandomForest classifier is classification, which is why you get a binary output of 0 or 1.

If you want a probability score for your classification property, try this:

var gridcoll_classifier = ee.Classifier.smileRandomForest(20).train({
  features: trainingPartition,
  classProperty: ClassProperty,
  inputProperties: ['S_mean', 'S_std']
}).setOutputMode('PROBABILITY');

Other options for the output mode are listed in the documentation: https://developers.google.com/earth-engine/apidocs/ee-classifier-setoutputmode

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda