Create classification dataset (from text files)

Create a classification dataset from tabulated text files and store the result as a pickle file. The format matches that of the FORCE Higher Level Sampling Submodule. Example files (force_features.csv and force_labels.csv) can be found in the EnMAP-Box testdata folder).

Usage:

  1. Open the algorithm from the processing toolbox.

  2. Select or create a classification dataset and specify the number of stratification bins and the number of samples, then click run.

    usr_section/usr_manual/processing_algorithms/dataset_creation/source/usr_section/usr_manual/processing_algorithms_includes/dataset_creation/img/random_samples_reg.png

Parameters

File with features [file]

Text file with tabulated feature data X (no headers). Each row represents the feature vector of a sample.

File with class values [file]

Text file with tabulated target data y (no headers). Each row represents the class value of a sample.

Outputs

Output dataset [fileDestination]

Pickle file destination.

Command-line usage

>qgis_process help enmapbox:CreateClassificationDatasetFromTextFiles:

----------------
Arguments
----------------

featureFile: File with features
    Argument type:  file
    Acceptable values:
            - Path to a file
valueFile: File with class values
    Argument type:  file
    Acceptable values:
            - Path to a file
outputClassificationDataset: Output dataset
    Argument type:  fileDestination
    Acceptable values:
            - Path for new file

----------------
Outputs
----------------

outputClassificationDataset: <outputFile>
    Output dataset