> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphext.com/llms.txt
> Use this file to discover all available pages before exploring further.

# configure_category_labels

> Configures the labels generated for each category. 

Note that for each possible `kind` parameter (`"significantTerms"`, `"sequential"`, or `"originals"`), this step has different configuration options. See subsections below for more details.

## Usage

The following examples show how the step can be used in a recipe.

<Accordion title="Examples" icon="code" defaultOpen="true">
  <Tabs>
    <Tab title="Example 1">
      ```stan theme={null}
      configure_category_labels(ds.cluster, { "kind": "originals" })
      ```
    </Tab>

    <Tab title="Example 2">
      E.g., to show sequentially numbered labels with the "cluster" prefix (cluster-1, cluster-2 etc.), use:

      ```stan theme={null}
      configure_category_labels(ds.cluster, { "kind": "sequential", "prefix": "cluster-" })
      ```
    </Tab>

    <Tab title="Signature">
      General syntax for using the step in a recipe. Shows the inputs and outputs the step is expected to receive and will produce respectively. For futher details see sections below.

      ```stan theme={null}
      configure_category_labels(column: category, {
          "param": value,
          ...
      })
      ```
    </Tab>
  </Tabs>
</Accordion>

## 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"`).

<Accordion title="Inputs" icon="right-to-bracket">
  <ParamField path="column" type="column[category]" required>
    Column to be configured.
  </ParamField>
</Accordion>

<Accordion title="Outputs" icon="right-from-bracket" />

## 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)`.

<Accordion title="Parameters" defaultOpen="true" icon="sliders">
  <Tabs>
    <Tab title="Significant Terms">
      <ParamField path="kind" type="string" default="significantTerms" required>
        Label categories with significant terms.
      </ParamField>

      <ParamField path="column" type="string" required>
        Significant terms column.
        This column's significant terms will be shown as category labels.
      </ParamField>

      <ParamField path="order" type="string" required>
        In what order to show the categories.

        Values must be one of the following:

        * `BACKGROUND`
        * `FOREGROUND`
        * `UPLIFT`
        * `TFIDF`
        * `ORDINAL`
      </ParamField>
    </Tab>

    <Tab title="Sequential">
      <ParamField path="kind" type="string" default="sequential" required>
        Label categories sequentially (1..N).
      </ParamField>

      <ParamField path="prefix" type="string" required>
        String that will be placed at the beginning of each label.
      </ParamField>
    </Tab>

    <Tab title="Originals">
      <ParamField path="kind" type="string" default="originals" required>
        Use column's original labels.
      </ParamField>
    </Tab>
  </Tabs>
</Accordion>
