I try to compute the mean value of a band on each image of an imageCollection and store all the values in a Array to compute the RMSE with another dataset that I will also store in an Array (not sure about this part, do I have to store them in array to be able to calculate the RMSE between the two ?). I try to use the .map() logic but got this error : A mapped algorithm must return a Feature or Image. Here is the function I made :
function meanChloaM(img){
var mean = img.reduceRegion(ee.Reducer.mean(), ROI)
var MeanModis = ee.Feature(mean)
return MeanModis
}
You can see my full code here : https://code.earthengine.google.com/e101fc2c9eabed8b04688569b1255888