I have clustered my map on the basis of NDVI values using an unsupervised approach. I don't have the labels. However, I do have the cluster IDs that were automatically assigned.
How do I assess the accuracy of my clustering approach (without labels)?
I have tried to computer silhouette score using sklearn:
from sklearn.metrics import silhouette_score
silhouette_avg = silhouette_score(clustering.select("ndvi"), clustering.select("clusters"))
Where clustering.select("ndvi")
is the clustered NDVI map and clustering.select("clusters")
contains the cluster IDs.
But it is giving me this error:
ValueError: Expected 2D array, got scalar array instead:
How can I achieve the computation of accuracy assessment of unsupervised clustering?