Validation

Set directory

Set parameters

Set filenames

1. Prepare data

1.1 Rasterize in situ data validation shapefile

1.2 Build y_pred and y_true

Sometimes, some classes do not appear in the classification map, they are not predicted by the Random Forest.

This means that some classes in y_true don't appear in y_pred.

1.3 Find class names

2. Confusion Matrix

2.1 Compute Confusion Matrix

2.2 Plot Confusion Matrix

3. Accuracy metrics

3.1 Compute Accuracy Metrics

If you decide that you are not interested in the scores of classes that were not predicted, then you can explicitly specify the classes you are interested in (which are labels that were predicted at least once).

3.2 Compute Overall Accuracy

3.3 Plot Accuracy Metrics