.. ## AUTOGENERATED TITLE START .. _alg-enmapbox-fitspectralanglemapper: *********************** Fit SpectralAngleMapper *********************** .. ## AUTOGENERATED TITLE END .. ## AUTOGENERATED DESCRIPTION START Spectral Angle Mapper \(SAM\). `Samples `_ are first normalizes to the unit sphere and then classified using nearest neighbour. See `Docs Center > Using ENVI > Spectral Angle Mapper `_ for a more details description. .. ## AUTOGENERATED DESCRIPTION END The Spectral Angle Mapper (SAM) classifier works by comparing the spectral angles between the spectral signature of a pixel and reference spectral signatures for various classes. SAM is advantageous for hyperspectral image classification because it takes into account the spectral information across many narrow wavelength bands, allowing it to capture subtle differences in spectral signatures.It is particularly useful in scenarios where different materials or land cover types have similar spectral shapes but differ in their angles in hyperspectral space. Usage: 1. Start the algorithm from the Processing Toolbox panel. 2. Select a training dataset or create one by clicking the processing algorithm icon, then click :guilabel:`run`. .. figure:: ../../processing_algorithms/classification/img/fitspectralangle_interface.png :align: center .. ## AUTOGENERATED PARAMETERS START **Parameters** :guilabel:`Classifier` [string] Scikit-learn python code. See `Normalizer `_, `KNeighborsClassifier `_ for information on different parameters. Default:: from sklearn.pipeline import make_pipeline from sklearn.preprocessing import Normalizer from sklearn.neighbors import KNeighborsClassifier classifier = make_pipeline\(Normalizer\(\), KNeighborsClassifier\(n_neighbors=1\)\) :guilabel:`Training dataset` [file] `Training dataset `_ `pickle file `_ used for fitting the `classifier `_. If not specified, an unfitted classifier is created. **Outputs** :guilabel:`Output classifier` [fileDestination] `Pickle file `_ destination. .. ## AUTOGENERATED PARAMETERS END .. ## AUTOGENERATED COMMAND USAGE START **Command-line usage** ``>qgis_process help enmapbox:fitspectralanglemapper``:: ---------------- Arguments ---------------- classifier: Classifier Default value: from sklearn.pipeline import make_pipeline from sklearn.preprocessing import Normalizer from sklearn.neighbors import KNeighborsClassifier classifier = make_pipeline(Normalizer(), KNeighborsClassifier(n_neighbors=1)) Argument type: string Acceptable values: - String value - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression dataset: Training dataset (optional) Argument type: file Acceptable values: - Path to a file outputClassifier: Output classifier Argument type: fileDestination Acceptable values: - Path for new file ---------------- Outputs ---------------- outputClassifier: Output classifier .. ## AUTOGENERATED COMMAND USAGE END