Stratify Values by Thresholds

You are viewing an old version of the documentation. You can switch to the documentation of the latest version by clicking the top-right corner of the page.

Function

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

stratify values by thresholds stratify values by thresholds

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

stratify values by thresholds input and output

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 add, input value in the pop-up window, and click OK to add a single threshold.

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

    If you have added multiple thresholds, please ensure that the added thresholds are sorted in 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.

    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: strings (without special characters)

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

Instruction: the number of labels = the number of thresholds + 1. The correspondence between thresholds and labels is determined by their sorting, irrelevant to the label names.

stratify values by thresholds stratify values by thresholds sample

Setting procedures:

  1. Click Set labels to open the JSON Editor window.

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

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

    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.

  4. Directory refers to the directory of the current project. Click ... on the right to change the directory of the project according to actual needs.

  5. Name the file in JSON File Name and click Save to save the label in the file.

  6. Click OK to finish adding the label.

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

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.