Stratify Values by Thresholds

Function

This Step stratifies input values by the set thresholds and output the labels.

../../../../_images/stratify_values_by_thresholds.png

Usage Scenario

This Step sorts and labels data by values. It is usually used with Validate Labels and Output Flags to filter the data list by value intervals. If you need to divide the data list into two parts by a threshold and filter out one of them, please use Dichotomize Values by Threshold together with Filter instead.

Input and Output

../../../../_images/input_output_35.png

Parameter Description

File Settings

Threshold File Name
Description: This parameter is used to set one or more thresholds and save the thresholds as a JSON file. The input values will be sorted based on the threshold.
Value type: Integer or float. Data of other types will be considered invalid and cannot be input successfully.
Tuning recommendation: You can set one or more thresholds.
Setting procedures:
  1. Click Set thresholds to open the JSON Editor window.

  2. Click +, input value in the pop-up window and click OK to add a single threshold.

  3. To add multiple thresholds, please repeat step 2.

    Hint

    If you have added multiple thresholds, please ensure that the added thresholds are sorted by ascending order. You can select the threshold and click up or down to adjust the order.

  4. Click in Directory to select a directory to store the JSON file. The default directory is the project folder.

  5. Enter a JSON File Name to name the threshold file and click Save.

  6. Click OK to finish adding the threshold.

    Hint

    If there is an existing threshold file, you can click in JSON File Name to open the file directly.

Label File Name
Description: This parameter is used to set labels after sorting the data, and save the labels as a JSON file.
Data type: String
Setting procedures:
  1. Click Set labels to open the JSON Editor window.

  2. Click +, input a string in the pop-up window and click OK to add a single label.

    Hint

    Except strings, other types of data will be considered invalid here and cannot be input successfully.

  3. To set multiple labels, please repeat step 2. The number of labels should be one more than the number of added thresholds.

    Hint

    To align the labels with the added thresholds, please ensure that the order of the labels corresponds with that of the thresholds displayed in the JSON Editor window. You can click up or down to adjust the order of the labels.

../../../../_images/stratify_values_by_thresholds_sample.png
  1. Click in Directory to select a directory to store the JSON file. The default directory is the project folder.

  2. Enter a JSON File Name to name the label file and click Save.

  3. Click OK to finish adding the label.

    Hint

    • If there is an existing label file, you can click in JSON File Name to open the file directly.