I am trying to classify an image collection. I was able to clip,sample the region and train the classifier but unable to perform classification. Can someone please help me with the code to classify an image collection?
var image = sentinel.filterBounds(aoi)
.filterDate('2021-11-30','2021-12-31')
.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20));
//clipping the image
var clipped_image = image.map(function(image){return ee.Image(image).clip(aoi)});
//sampling the region
var trainingPoints = image.map(function (image) {
return image.sampleRegions({collection:training,
properties:['lc'],
scale:10});
}).flatten();
//training the classifier
var classifier= ee.Classifier.smileRandomForest(10).train({'features' :trainingPoints,
classProperty:'lc',
inputProperties:bands
});
How to classify the image collection?