I am using google earth engine to classify landcover. I Uploaded the asset called 'gridcoll_merged_modified' (it is a .csv excel/libreoffice file). So, I tried to run the following code/script training and testing the script; the aim, at the line '134' (see the text '//Filtering out the null property values' etc..) is to delete any null value into the asset or vector for training and testing partition.
<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));
//Filtering out the null property values and try again.
var trainingNoNulls = trainingPartition.filter(ee.Filter.notNull(trainingPartition.propertyNames()));
//var trainingNoNulls = trainingPartition.map(function(feature) {
//return feature.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: trainingNoNulls,
classProperty: ClassProperty,
inputProperties: ['S']
//'HCv','VCv','El','As','Hill','MeCur','NDVI','NDWI','Precipitation','Relief']
});
print('Gridcoll Classifier', gridcoll_classifier);
var test = testingPartition.classify(gridcoll_classifier);
print('Gridcoll_test', test);>
...In the end, the following error appeared in the GEE console (see the image below):
I am getting the layer error every time and I don't know how to solve it.
thanks in advance.