Validation

A function for producing sufficient sample points for validation to a specified confidence using the method detailed in Olafsson et al [1]. You provide a configuration file containing expected user accuracy for each class, a minimum number of samples for any class that is sparse and a target standard error value.

An example validation file for an classification map with three classes [1,2 and 3] with a no-data value of 0. Class 1 is sparse, and needs at least 100 validation points.

This can be called with the script at apps.validation.sample_allocation

[paths]
#Specifiy the paths to your input and outputs.
input_path=/path/to/your/image
output_path=/where/to/save/your/output/shapefile

[augments]
# The target standard error
target_standard_error=0.01
no_data_class=0

[user_accuracy]
#Add the expected user accuracy for each class in your image as below:
#class_label=expected_accuracy (between 0 and 1)
1=0.3
2=0.7
3=0.88

[pinned_samples]
# For sparse classes, please provde a specified number of validation points
# as listed in olafsson etal. Any classes not listed here will be presumed to
# be non-sparse, and will have their pixel values automatically filled.
1=100

Function reference

pyeo.validation.create_validation_scenario(in_map_path, out_shapefile_path, target_standard_error, user_accuracies, no_data_class=None, pinned_samples=None, produce_csv=False)

Creates a set of validation points based on

Parameters:
  • in_map_path

  • out_shapefile_path

  • target_standard_error

  • user_accuracies

  • no_data_class

  • pinned_samples