Once spectra carry optical water type labels, any supervised classifier can learn to assign new spectra to them. The labels may come from a published scheme, from clustering, or from expert judgement. Random forests (Breiman 2001), support vector machines and neural networks have all been used, for example for Spanish inland waters from Sentinel-2 MSI reflectance (Remote Sensing 14, 5568, 2022, doi:10.3390/rs14215568).
SupervisedClassifier wraps a scikit-learn classifier that has predict_proba, and gives it the common interface. Spectra are normalised first, as in the other classifiers. The memberships are the class probabilities, so they sum to one.
Using the classifier
The example learns the ten Bi & Hieronymi types directly from the OLCI spectra of their training set, with half of the spectra held back for testing.
from sklearn.neural_network import MLPClassifiermlp = SupervisedClassifier(MLPClassifier(hidden_layer_sizes=(64, 64), max_iter=500))
Choices and notes
The default estimator is a random forest with 300 trees. It needs no feature scaling and gives smooth class probabilities.
Probabilities sum to one, so they do not flag spectra unlike every class. Screen spectra with QWIP, or compare with the membership sum of a chi-squared classifier.
The fitted estimator is not an array and cannot be written to a netCDF class set. to_netcdf raises an error; store the classifier with joblib or pickle.