Hello there,
I want to classify a multiple-layer spatial raster image unsupervisedly into 2 classes by using fuzzy c means clustering.
My first question is how to cluster multiple inputs in scikit-fuzzy. For example, I defined one input as an 1D array named "xpts" and another input named "ypts". Now I wrote them into alldata using "alldata = np.vstack((xpts, ypts))" and attempt to use "cntr, u, u0, d, jm, p, fpc = fuzz.cluster.cmeans(alldata, 2, 2, error=0.005, maxiter=1000, init=None)" to get the "u" with information of how much likely the value belongs to one cluster. Is it the right way to do it?
I didn't succeed by getting outcomes as 0.5 percentage for one cluster for all values.
Futhermore, I also need to mask out some areas by giving them nan values. I notice fuzz.cluster.cmeans could deal with nan values. but it works when I convert the nan values to 0. But I am not sure whether the zeros would influence the clustering.
Looking forward to your reply!
Best,
Xiaoye