Skip to main content

Usage

The following example shows how the step can be used in a recipe.

Examples

  • Example 1
  • Signature
configure_discarded_categories(ds.cluster, { "thresholds": [{ "target": "EVERYTHING", "reference": "PERCENTAGE", "value": 20 }] })

Inputs & Outputs

The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced by name e.g. "churn-clf").
column
column[category|list[category]|text]
required
The column to configure.

Configuration

The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e. step(..., {"param": "value", ...}) -> (output).

Parameters

thresholds
[array, array, array, array]
required
A list of threshold configurations. A categorical column can have two kinds of thresholds determining whether specific categories will be hidden from its view in the UI: a minimum number of rows in the current selection below which a category will be hidden, or a minimum number of rows in the whole dataset (everything).The thresholds parameter should be a list containing 1 or 2 objects: the configuration of a selection threshold, and/or the configuration of a threshold for everything.
  • array
  • array
  • array
  • array
{_}
array
array.
Item 0
object
Configure categories to be discarded (hidden) in terms of their occurrence in the whole dataset. Categories with a number (or percentage) of rows in the whole dataset less than value will be discarded (hidden from the variable’s filter view).
target
string
default:"EVERYTHING"
Whether to apply the threshold to the current selection of rows or all rows in the dataset.
reference
string
Whether to interpret the threshold value as an absolute (count) or percentage of rows.Values must be one of the following:
  • ABSOLUTE
  • PERCENTAGE
value
number
Categories less frequent than this value will be discarded (hidden).
I