This tab allows for the classification of the :ref:`band_set_tab` using the spectral signatures checked in :ref:`ROI_list`. Several classification options are set in this tab which affect the classification process also during the :ref:`classification_preview`.
This tool allows for the selection of one the following algorithms:
- :ref:`maximum_likelihood`
- :ref:`minimum_distance`
- :ref:`multi_layer_perceptron`
- :ref:`random_forest`
- :ref:`spectral_angle_mapping`
- :ref:`support_vector_machine`
Also, it is possible to save and load a trained classifier.
Tip
Information about APIs of this tool in Remotior Sensus at this link .
Tool symbol and name | Description |
---|---|
:guilabel:`Select input band set` | select the input :ref:`band_set_tab` to be classified |
:guilabel:`Use input normalization` | if checked, normalize the input based on the selected method |
:guilabel:`Z-score` | if checked with :guilabel:`Use input normalized`, Z-score normalization of input is performed |
:guilabel:`Linear scaling` | if checked with :guilabel:`Use input normalized`, Linear scaling normalization of input is performed |
:guilabel:`Use training` :guilabel:`Macroclass ID` | if checked, the classification is performed using |
:guilabel:`Use training` :guilabel:`Class ID` the Macroclass ID (code MC ID of the signature) | if checked, the classification is performed using the Class ID (code C ID of the signature) |
This tool allows for the selection of the classification algorithm. The algorithm tab includes the available parameters.
Use the :ref:`max_likelihood_algorithm` algorithm.
Tool symbol and name | Description |
---|---|
:guilabel:`Use single threshold` | if checked, it allows for the definition of a classification threshold (applied to all the spectral signatures); pixels are unclassified if probability is less than threshold value (max 100) |
:guilabel:`Signature threshold` | if checked, thresholds :ref:`Signature_threshold_tab` are evaluated |
open the :ref:`Signature_threshold_tab` for the definition of signature thresholds | |
:guilabel:`Save signature raster` | if checked, in addition to the classification raster, for each spectral signature a raster is saved in the same output directory, which represents the distance between pixel and signature |
:guilabel:`Calculate classification confidence raster` | if checked, calculate classification confidence raster |
Use the :ref:`minimum_distance_algorithm` algorithm.
Tool symbol and name | Description |
---|---|
:guilabel:`Use single threshold` | if checked, it allows for the definition of a classification threshold (applied to all the spectral signatures); pixels are unclassified if distance is greater than threshold value |
:guilabel:`Signature threshold` | if checked, thresholds :ref:`Signature_threshold_tab` are evaluated |
open the :ref:`Signature_threshold_tab` for the definition of signature thresholds | |
:guilabel:`Save signature raster` | if checked, in addition to the classification raster, for each spectral signature a raster is saved in the same output directory, which represents the distance between pixel and signature |
:guilabel:`Calculate classification confidence raster` | if checked, calculate classification confidence raster |
Use the :ref:`multi_layer_perceptron_algorithm` algorithm.
Tool symbol and name | Description |
---|---|
:guilabel:`Use framework` :guilabel:`scikit-learn` | if checked, use scikit-learn framework (read this) |
:guilabel:`Use framework` :guilabel:`PyTorch` | if checked, use PyTorch framework (read about this) |
:guilabel:`Hidden layer sizes` | list of values separated by comma, where each value defines the number of neurons in a hidden layer (e.g.: 200, 100 for two hidden layers of 200 and 100 neurons respectively) |
:guilabel:`Max iter` | set the maximum number of iterations |
:guilabel:`Activation` | set the activation function (default: relu) |
:guilabel:`Alpha` | set the weight decay (also L2 regularization term) for Adam optimizer |
:guilabel:`Training proportion` | set the proportion of data to be used as training and the remaining part as test |
:guilabel:`Batch size` | set the number of samples per batch for optimizer; if auto, the batch is the minimum value between 200 and the number of samples |
:guilabel:`Learning rate init` | set initial learning rate |
:guilabel:`Cross validation` | if checked, perform cross validation |
:guilabel:`Find best estimator with steps` | if checked, find the best estimator iteratively with a number of steps |
:guilabel:`Calculate classification confidence raster` | if checked, calculate classification confidence raster |
:guilabel:`Cross validation` is a function provided by scikit-learn
to
avoid overfitting by splitting the training set into k
smaller sets
(read more .
In particular, the function StratifiedKFold
(with parameters n_splits=5,
shuffle=True) is used to create 5 sets, each one containing approximately the
same percentage of samples for each class as the complete set.
This option can potentially increase significantly the computation time.
If :guilabel:`Find best estimator with steps` is checked, the algorithm tries to find the best estimator iteratively with the defined number of steps (the more the steps, the slower the process will be), by changing the algorithm parameters.
Use the :ref:`random_forest_definition` algorithm.
Tool symbol and name | Description |
---|---|
:guilabel:`Number of trees` | set the number of trees |
:guilabel:`Minimum number to split` | set the minimum number of samples required to split an internal node |
:guilabel:`Max features` | for node splitting, if empty all features are considered; if sqrt the square root of all the features, if integer number the number of features; if float number a fraction of all the features |
:guilabel:`One-Vs-Rest` | if checked, perform One-Vs-Rest classification (read more) |
:guilabel:`Cross validation` | if checked, perform cross validation |
:guilabel:`Balanced class weight` | if checked, balanced weight is computed inversely proportional to class frequency |
:guilabel:`Find best estimator with steps` | if checked, find the best estimator iteratively with a number of steps |
:guilabel:`Calculate classification confidence raster` | if checked, calculate classification confidence raster |
:guilabel:`Cross validation` is a function provided by scikit-learn
to
avoid overfitting by splitting the training set into k
smaller sets
(read more .
In particular, the function StratifiedKFold
(with parameters n_splits=5,
shuffle=True) is used to create 5 sets, each one containing approximately the
same percentage of samples for each class as the complete set.
This option can potentially increase significantly the computation time.
If :guilabel:`Find best estimator with steps` is checked, the algorithm tries to find the best estimator iteratively with the defined number of steps (the more the steps, the slower the process will be), by changing the algorithm parameters.
If :guilabel:`One-Vs-Rest` is checked, the algorithm performs One-Vs-Rest classification which basically fits one classifier per class.
If :guilabel:`Balanced class weight` is checked, the algorithm gives all classes equal weight with a balanced weight that is computed inversely proportional to class frequency in the training data.
Use the :ref:`spectra_angle_mapping_algorithm` algorithm.
Tool symbol and name | Description |
---|---|
:guilabel:`Use single threshold` | if checked, it allows for the definition of a classification threshold (applied to all the spectral signatures); pixels are unclassified if spectral angle distance is greater than threshold value (max 90) |
:guilabel:`Signature threshold` | if checked, thresholds :ref:`Signature_threshold_tab` are evaluated |
open the :ref:`Signature_threshold_tab` for the definition of signature thresholds | |
:guilabel:`Save signature raster` | if checked, in addition to the classification raster, for each spectral signature a raster is saved in the same output directory, which represents the distance between pixel and signature |
:guilabel:`Calculate classification confidence raster` | if checked, calculate classification confidence raster |
Use the :ref:`support_vector_machine_definition` algorithm.
Tool symbol and name | Description |
---|---|
:guilabel:`Regularization parameter C` | set the regularization parameter C |
:guilabel:`Kernel` | set the kernel (default: rbf) |
:guilabel:`Gamma` | set the kernel coefficient gamma (default: scale) |
:guilabel:`Cross validation` | if checked, perform cross validation |
:guilabel:`Balanced class weight` | if checked, balanced weight is computed inversely proportional to class frequency |
:guilabel:`Find best estimator with steps` | if checked, find the best estimator iteratively with a number of steps |
:guilabel:`Calculate classification confidence raster` | if checked, calculate classification confidence raster |
:guilabel:`Cross validation` is a function provided by scikit-learn
to
avoid overfitting by splitting the training set into k
smaller sets
(read more .
In particular, the function StratifiedKFold
(with parameters n_splits=5,
shuffle=True) is used to create 5 sets, each one containing approximately the
same percentage of samples for each class as the complete set.
This option can potentially increase significantly the computation time.
If :guilabel:`Find best estimator with steps` is checked, the algorithm tries to find the best estimator iteratively with the defined number of steps (the more the steps, the slower the process will be), by changing the algorithm parameters.
If :guilabel:`Balanced class weight` is checked, the algorithm gives all classes equal weight with a balanced weight that is computed inversely proportional to class frequency in the training data.
It is possible to run the classification, or save and load a trained classifier.
Classification raster is a file .tif
(a QGIS style file .qml
is saved
along with the classification); also other outputs can be optionally calculated.
Outputs are loaded in QGIS after the calculation.
Tool symbol and name | Description |
---|---|
:guilabel:`Load classifier` | open an already save classifier file (.rsmo) |
:guilabel:`Save classifier` | save the classifier to file (.rsmo), in order to be loaded later |
:guilabel:`RUN` | run this function |