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

# cluster_dataset

> Identify clusters in the dataset. 

Applies a clustering algorithm after vectorizing the input dataset (converting its columns to numeric-only and no
missing data), and optionally reducing its dimensionality.

Essentially applies the separate step `vectorize_dataset`, followed by a clustering algorithm
([HDBSCAN](https://hdbscan.readthedocs.io/en/latest/index.html) by default). The result is a column of cluster IDs.

For further detail on HDBSCAN's parameters see its documentation [here (for usage)](https://hdbscan.readthedocs.io/en/latest/parameter_selection.html#)
and [here (for its API)](https://hdbscan.readthedocs.io/en/latest/api.html).

## Usage

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

<Accordion title="Examples" icon="code" defaultOpen="true">
  <Tabs>
    <Tab title="Example 1">
      The following configuration applies clustering with the default values:

      ```stan theme={null}
      cluster_dataset(ds, {
        "algorithm": "hdbscan",
        "min_cluster_size": 120,
        "min_samples": 15,
        "reduce": {
            "weights": null,
            "weights_max": 32,
            "weights_exp": 2,
            "algorithm": "umap",
            "n_components": 10,
            "n_neighbors": 100,
            "min_dist": 0,
            "random_state": 42
        }
      }) -> (ds.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}
      cluster_dataset(ds: dataset, {
          "param": value,
          ...
      }) -> (*cluster: column)
      ```
    </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="ds" type="dataset" required>
    An arbitrary input dataset.
  </ParamField>
</Accordion>

<Accordion title="Outputs" icon="right-from-bracket">
  <ParamField path="*cluster" type="column">
    One or two columns containing the clustering results. If one column name is provided, the single output
    will contain the cluster labels. If two column names are provided, the second column will contain the
    the probability that a data points belongs to the assigned cluster.
  </ParamField>
</Accordion>

## 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">
  <ParamField path="metric" type="string" default="euclidean">
    The metric used to calculate similarity between data points.

    Values must be one of the following:

    `euclidean` `manhattan` `chebyshev` `minkowski` `canberra` `braycurtis` `haversine` `mahalanobis` `wminkowski` `seuclidean` `cosine` `correlation` `hamming` `jaccard` `dice` `russellrao` `kulsinski` `rogerstanimoto` `sokalmichener` `sokalsneath` `yule`
  </ParamField>

  <ParamField path="algorithm" type="string" default="hdbscan">
    Algorithm to use.
    The name of a supported clustering algorithm (currently allows `"hdbscan"` only).

    Values must be one of the following:

    * `hdbscan`
  </ParamField>

  <ParamField path="min_cluster_size" type="integer" default="120">
    Minimum cluster size.
    The minimum size for considering a region of dense data points a proper cluster.

    Values must be in the following range:

    ```javascript theme={null}
    1 ≤ min_cluster_size < inf
    ```
  </ParamField>

  <ParamField path="min_samples" type="integer" default="15">
    The larger the value, the more conservative the clustering.
    More points will be declared as noise, and clusters will be restricted to progressively more dense areas.

    Values must be in the following range:

    ```javascript theme={null}
    1 ≤ min_samples < inf
    ```
  </ParamField>

  <ParamField path="reduce" type="[object, null]">
    Umap configuration. See more [here](https://umap-learn.readthedocs.io/en/latest/parameters.html).
    Params for dimensionality reduction.

    <Accordion title="Properties">
      <ParamField path="algorithm" type="string" default="umap">
        Algorithm.
        The name of a supported dimensionality reduction algorithm.

        Values must be one of the following:

        * `umap`
      </ParamField>

      <ParamField path="encode_features" type="boolean" default="true">
        Toggle encoding of feature columns.
        When enabled, Graphext will auto-convert any column types to the numeric type before
        (optionally) reducing the data's dimensionality. How this conversion is done can be
        configured using the `feature_encoder` option below.

        <Warning>If disabled, the dimensionality reduction algorithm applied in this step will
        assume that input data is already numerical and doesn't contain any missing
        values.</Warning>
      </ParamField>

      <ParamField path="feature_encoder" type="[null, object]">
        Configures encoding of feature columns.
        By default (`null`), Graphext chooses automatically how to convert any column types the model
        may not understand natively to a numeric type.

        A configuration object can be passed instead to overwrite specific parameter values with respect
        to their default values.

        <Accordion title="Properties">
          <ParamField path="number" type="object">
            Numeric encoder.
            Configures encoding of numeric features.

            <Accordion title="Properties">
              <ParamField path="indicate_missing" type="boolean">
                Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
              </ParamField>

              <ParamField path="imputer" type="[null, string]">
                Whether and how to impute (replace/fill) missing values.

                Values must be one of the following:

                * `Mean`
                * `Median`
                * `MostFrequent`
                * `Const`
                * `None`
              </ParamField>

              <ParamField path="scaler" type="[null, string]">
                Whether and how to scale the final numerical values (across a single column).

                Values must be one of the following:

                * `Standard`
                * `Robust`
                * `KNN`
                * `None`
              </ParamField>

              <ParamField path="scaler_params" type="object">
                Further parameters passed to the `scaler` function.
                Details depend no the particular scaler used.
              </ParamField>
            </Accordion>
          </ParamField>

          <ParamField path="bool" type="object">
            Boolean encoder.
            Configures encoding of boolean features.

            <Accordion title="Properties">
              <ParamField path="indicate_missing" type="boolean">
                Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
              </ParamField>

              <ParamField path="imputer" type="[null, string]">
                Whether and how to impute (replace/fill) missing values.

                Values must be one of the following:

                * `MostFrequent`
                * `Const`
                * `None`
              </ParamField>
            </Accordion>
          </ParamField>

          <ParamField path="ordinal" type="object">
            Ordinal encoder.
            Configures encoding of categorical features that have a natural order.

            <Accordion title="Properties">
              <ParamField path="indicate_missing" type="boolean">
                Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
              </ParamField>

              <ParamField path="imputer" type="[null, string]">
                Whether and how to impute (replace/fill) missing values.

                Values must be one of the following:

                * `MostFrequent`
                * `Const`
                * `None`
              </ParamField>
            </Accordion>
          </ParamField>

          <ParamField path="category" type="[object, object]">
            Category encoder.
            May contain either a single configuration for all categorical variables, or two different configurations
            for low- and high-cardinality variables. For further details pick one of the two options below.

            <Accordion title="Options">
              <Tabs>
                <Tab title="Simple category encoder">
                  <ParamField path="indicate_missing" type="boolean">
                    Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
                  </ParamField>

                  <ParamField path="imputer" type="[null, string]">
                    Whether and how to impute (replace/fill) missing values.

                    Values must be one of the following:

                    * `MostFrequent`
                    * `Const`
                    * `None`
                  </ParamField>

                  <ParamField path="max_categories" type="[null, integer]">
                    Maximum number of unique categories to encode.
                    Only the N-1 most common categories will be encoded, and the rest will be grouped into a single
                    "Others" category.

                    Values must be in the following range:

                    ```javascript theme={null}
                    1 ≤ max_categories < inf
                    ```
                  </ParamField>

                  <ParamField path="encoder" type="[null, string]">
                    How to encode categories.

                    Values must be one of the following:

                    `OneHot` `Label` `Ordinal` `Binary` `Frequency` `None`
                  </ParamField>

                  <ParamField path="scaler" type="[null, string]">
                    Whether and how to scale the final numerical values (across a single column).

                    Values must be one of the following:

                    * `Standard`
                    * `Robust`
                    * `KNN`
                    * `None`
                  </ParamField>
                </Tab>

                <Tab title="Conditional category encoder">
                  <ParamField path="cardinality_treshold" type="integer">
                    Condition for application of low- or high-cardinality configuration.
                    Number of unique categories below which the `low_cardinality` configuration is used,
                    and above which the `high_cardinality` configuration is used.

                    Values must be in the following range:

                    ```javascript theme={null}
                    3 ≤ cardinality_treshold < inf
                    ```
                  </ParamField>

                  <ParamField path="low_cardinality" type="object">
                    Low cardinality configuration.
                    Used for categories with fewer than `cardinality_threshold` unique categories.

                    <Accordion title="Properties">
                      <ParamField path="indicate_missing" type="boolean">
                        Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
                      </ParamField>

                      <ParamField path="imputer" type="[null, string]">
                        Whether and how to impute (replace/fill) missing values.

                        Values must be one of the following:

                        * `MostFrequent`
                        * `Const`
                        * `None`
                      </ParamField>

                      <ParamField path="max_categories" type="[null, integer]">
                        Maximum number of unique categories to encode.
                        Only the N-1 most common categories will be encoded, and the rest will be grouped into a single
                        "Others" category.

                        Values must be in the following range:

                        ```javascript theme={null}
                        1 ≤ max_categories < inf
                        ```
                      </ParamField>

                      <ParamField path="encoder" type="[null, string]">
                        How to encode categories.

                        Values must be one of the following:

                        `OneHot` `Label` `Ordinal` `Binary` `Frequency` `None`
                      </ParamField>

                      <ParamField path="scaler" type="[null, string]">
                        Whether and how to scale the final numerical values (across a single column).

                        Values must be one of the following:

                        * `Standard`
                        * `Robust`
                        * `KNN`
                        * `None`
                      </ParamField>
                    </Accordion>
                  </ParamField>

                  <ParamField path="high_cardinality" type="object">
                    High cardinality configuration.
                    Used for categories with more than `cardinality_threshold` unique categories.

                    <Accordion title="Properties">
                      <ParamField path="indicate_missing" type="boolean">
                        Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
                      </ParamField>

                      <ParamField path="imputer" type="[null, string]">
                        Whether and how to impute (replace/fill) missing values.

                        Values must be one of the following:

                        * `MostFrequent`
                        * `Const`
                        * `None`
                      </ParamField>

                      <ParamField path="max_categories" type="[null, integer]">
                        Maximum number of unique categories to encode.
                        Only the N-1 most common categories will be encoded, and the rest will be grouped into a single
                        "Others" category.

                        Values must be in the following range:

                        ```javascript theme={null}
                        1 ≤ max_categories < inf
                        ```
                      </ParamField>

                      <ParamField path="encoder" type="[null, string]">
                        How to encode categories.

                        Values must be one of the following:

                        `OneHot` `Label` `Ordinal` `Binary` `Frequency` `None`
                      </ParamField>

                      <ParamField path="scaler" type="[null, string]">
                        Whether and how to scale the final numerical values (across a single column).

                        Values must be one of the following:

                        * `Standard`
                        * `Robust`
                        * `KNN`
                        * `None`
                      </ParamField>
                    </Accordion>
                  </ParamField>
                </Tab>
              </Tabs>
            </Accordion>
          </ParamField>

          <ParamField path="multilabel" type="[object, object]">
            Multilabel encoder.
            Configures encoding of multivalued categorical features (variable length lists of categories,
            or the semantic type `list[category]` for short). May contain either a single configuration for
            all multilabel variables, or two different configurations for low- and high-cardinality variables.
            For further details pick one of the two options below.

            <Accordion title="Options">
              <Tabs>
                <Tab title="Simple multilabel encoder">
                  <ParamField path="indicate_missing" type="boolean">
                    Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
                  </ParamField>

                  <ParamField path="encoder" type="[null, string]">
                    How to encode categories/labels in multilabel (list\[category]) columns.

                    Values must be one of the following:

                    * `Binarizer`
                    * `TfIdf`
                    * `None`
                  </ParamField>

                  <ParamField path="max_categories" type="[null, integer]">
                    Maximum number of categories/labels to encode.
                    If a number is provided, the result of the encoding will be reduced to these many dimensions (columns)
                    using scikit-learn's [truncated SVD](https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.TruncatedSVD.html).
                    When applied together with (after a) Tf-Idf encoding, this performs a kind of
                    [latent semantic analysis](https://en.wikipedia.org/wiki/Latent_semantic_analysis).

                    Values must be in the following range:

                    ```javascript theme={null}
                    2 ≤ max_categories < inf
                    ```
                  </ParamField>

                  <ParamField path="scaler" type="[null, string]">
                    How to scale the encoded (numerical columns).

                    Values must be one of the following:

                    * `Euclidean`
                    * `KNN`
                    * `Norm`
                    * `None`
                  </ParamField>
                </Tab>

                <Tab title="Conditional multilabel encoder">
                  <ParamField path="cardinality_treshold" type="integer">
                    Condition for application of low- or high-cardinality configuration.
                    Number of unique categories below which the `low_cardinality` configuration is used,
                    and above which the `high_cardinality` configuration is used.

                    Values must be in the following range:

                    ```javascript theme={null}
                    3 ≤ cardinality_treshold < inf
                    ```
                  </ParamField>

                  <ParamField path="low_cardinality" type="object">
                    Low cardinality configuration.
                    Used for mulitabel columns with fewer than `cardinality_threshold` unique categories/labels.

                    <Accordion title="Properties">
                      <ParamField path="indicate_missing" type="boolean">
                        Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
                      </ParamField>

                      <ParamField path="encoder" type="[null, string]">
                        How to encode categories/labels in multilabel (list\[category]) columns.

                        Values must be one of the following:

                        * `Binarizer`
                        * `TfIdf`
                        * `None`
                      </ParamField>

                      <ParamField path="max_categories" type="[null, integer]">
                        Maximum number of categories/labels to encode.
                        If a number is provided, the result of the encoding will be reduced to these many dimensions (columns)
                        using scikit-learn's [truncated SVD](https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.TruncatedSVD.html).
                        When applied together with (after a) Tf-Idf encoding, this performs a kind of
                        [latent semantic analysis](https://en.wikipedia.org/wiki/Latent_semantic_analysis).

                        Values must be in the following range:

                        ```javascript theme={null}
                        2 ≤ max_categories < inf
                        ```
                      </ParamField>

                      <ParamField path="scaler" type="[null, string]">
                        How to scale the encoded (numerical columns).

                        Values must be one of the following:

                        * `Euclidean`
                        * `KNN`
                        * `Norm`
                        * `None`
                      </ParamField>
                    </Accordion>
                  </ParamField>

                  <ParamField path="high_cardinality" type="object">
                    High cardinality configuration.
                    Used for categories with more than `cardinality_threshold` unique categories.

                    <Accordion title="Properties">
                      <ParamField path="indicate_missing" type="boolean">
                        Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
                      </ParamField>

                      <ParamField path="encoder" type="[null, string]">
                        How to encode categories/labels in multilabel (list\[category]) columns.

                        Values must be one of the following:

                        * `Binarizer`
                        * `TfIdf`
                        * `None`
                      </ParamField>

                      <ParamField path="max_categories" type="[null, integer]">
                        Maximum number of categories/labels to encode.
                        If a number is provided, the result of the encoding will be reduced to these many dimensions (columns)
                        using scikit-learn's [truncated SVD](https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.TruncatedSVD.html).
                        When applied together with (after a) Tf-Idf encoding, this performs a kind of
                        [latent semantic analysis](https://en.wikipedia.org/wiki/Latent_semantic_analysis).

                        Values must be in the following range:

                        ```javascript theme={null}
                        2 ≤ max_categories < inf
                        ```
                      </ParamField>

                      <ParamField path="scaler" type="[null, string]">
                        How to scale the encoded (numerical columns).

                        Values must be one of the following:

                        * `Euclidean`
                        * `KNN`
                        * `Norm`
                        * `None`
                      </ParamField>
                    </Accordion>
                  </ParamField>
                </Tab>
              </Tabs>
            </Accordion>
          </ParamField>

          <ParamField path="datetime" type="object">
            Datetime encoder.
            Configures encoding of datetime (timestamp) features.

            <Accordion title="Properties">
              <ParamField path="indicate_missing" type="boolean">
                Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
              </ParamField>

              <ParamField path="components" type="array[string]">
                A list of numerical components to extract.
                Will create one numeric column for each component.

                <Accordion title="Array items">
                  <ParamField path="Item" type="string">
                    Each item in array.

                    Values must be one of the following:

                    `day` `dayofweek` `dayofyear` `hour` `minute` `month` `quarter` `season` `second` `week` `weekday` `weekofyear` `year`
                  </ParamField>
                </Accordion>
              </ParamField>

              <ParamField path="cycles" type="array[string]">
                A list of cyclical time features to extract.
                "Cycles" are numerical transformations of features that should be represented on a circle. E.g. months,
                ranging from 1 to 12, should be arranged such that 12 and 1 are next to each other, rather than on
                opposite ends of a linear scale. We represent such cyclical time features on a circle by creating two
                columns for each original feature: the sin and cos of the numerical feature after appropriate scaling.

                <Accordion title="Array items">
                  <ParamField path="Item" type="string">
                    Each item in array.

                    Values must be one of the following:

                    * `day`
                    * `dayofweek`
                    * `dayofyear`
                    * `hour`
                    * `month`
                  </ParamField>
                </Accordion>
              </ParamField>

              <ParamField path="epoch" type="[null, boolean]">
                Whether to include the epoch as new feature (seconds since 01/01/1970).
              </ParamField>

              <ParamField path="imputer" type="[null, string]">
                Whether and how to impute (replace/fill) missing values.

                Values must be one of the following:

                * `Mean`
                * `Median`
                * `MostFrequent`
                * `Const`
                * `None`
              </ParamField>

              <ParamField path="component_scaler" type="[null, string]">
                Whether and how to scale the final numerical values (across a single column).

                Values must be one of the following:

                * `Standard`
                * `Robust`
                * `KNN`
                * `None`
              </ParamField>

              <ParamField path="vector_scaler" type="[null, string]">
                How to scale the encoded (numerical columns).

                Values must be one of the following:

                * `Euclidean`
                * `KNN`
                * `Norm`
                * `None`
              </ParamField>
            </Accordion>
          </ParamField>

          <ParamField path="embedding" type="object">
            Embedding/vector encoder.
            Configures encoding of multivalued numerical features (variable length lists of numbers, i.e. vectors, or the semantic type `list[number]` for short).

            <Accordion title="Properties">
              <ParamField path="indicate_missing" type="boolean">
                Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
              </ParamField>

              <ParamField path="scaler" type="[null, string]">
                How to scale the encoded (numerical columns).

                Values must be one of the following:

                * `Euclidean`
                * `KNN`
                * `Norm`
                * `None`
              </ParamField>
            </Accordion>
          </ParamField>

          <ParamField path="text" type="object">
            Text encoder.
            Configures encoding of text (natural language) features. Currently only allows
            [Tf-Idf](https://en.wikipedia.org/wiki/Tf%E2%80%93idf) embeddings to represent texts. If you wish
            to use other embeddings, e.g. semantic, Word2Vec etc., transform your text column first using
            another step, and then use that result instead of the original texts.

            <Warning>Texts are *excluded* by default from the overall encoding of the dataset. See parameter
            `include_text_features` below to active it.</Warning>

            <Accordion title="Properties">
              <ParamField path="indicate_missing" type="boolean">
                Toggle the addition of a column using 0s and 1s to indicate where an input column contained missing values.
              </ParamField>

              <ParamField path="encoder_params" type="object">
                Parameters to be passed to the text encoder (Tf-Idf parameters only for now).
                See [scikit-learn's documentation](https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html)
                for detailed parameters and their explanation.
              </ParamField>

              <ParamField path="n_components" type="integer">
                How many output features to generate.
                The resulting Tf-Idf vectors will be reduced to these many dimensions (columns) using scikit-learn's
                [truncated SVD](https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.TruncatedSVD.html).
                This performs a kind of [latent semantic analysis](https://en.wikipedia.org/wiki/Latent_semantic_analysis).
                By default we will reduce to 200 components.

                Values must be in the following range:

                ```javascript theme={null}
                2 ≤ n_components ≤ 1024
                ```
              </ParamField>

              <ParamField path="scaler" type="[null, string]">
                How to scale the encoded (numerical columns).

                Values must be one of the following:

                * `Euclidean`
                * `KNN`
                * `Norm`
                * `None`
              </ParamField>
            </Accordion>
          </ParamField>
        </Accordion>
      </ParamField>

      <ParamField path="include_text_features" type="boolean" default="false">
        Whether to include or ignore text columns during the processing of input data.
        Enabling this will convert texts to their Tf-Idf representation. Each text will be
        converted to an N-dimensional vector in which each component measures the relative
        "over-representation" of a specific word (or n-gram) relative to its overall
        frequency in the whole dataset. This is disabled by default because it will
        often be better to convert texts explicitly using a previous step, such as
        `embed_text` or `embed_text_with_model`.
      </ParamField>

      <ParamField path="weights" type="[object, null]">
        Weights used to multiply the normalized columns/features after vectorization.
        Should be a dictionary/object of `{"column_name": weight, ...}` items. Will be scaled using the
        parameters `weights_max`, and `weights_exp` before being applied. So only the relative weight of
        the columns is important here, not their absolute values.

        <Accordion title="Item properties">
          <ParamField path="column_weight" type="number">
            A `"column_name": numeric_weight` pair.
            Each column name must refer to an existing column in the dataset.
          </ParamField>
        </Accordion>

        <Accordion title="Examples">
          * `{"date": 0.5, "age": 2}`
        </Accordion>
      </ParamField>

      <ParamField path="type_weights" type="[object, null]">
        Weights used to multiply the normalized columns/features after vectorization.
        Should be a dictionary/object of `"type": weight"` items. Will be scaled using the parameters
        `weights_max`, and `weights_exp` before being applied. So only the relative weight of the columns
        is important here, not their absolute values.

        <Accordion title="Properties">
          <ParamField path="number" type="number">
            Weight for columns of type `Number`
          </ParamField>

          <ParamField path="datetime" type="number">
            Weight for columns of type `Datetime`
          </ParamField>

          <ParamField path="category" type="number">
            Weight for columns of type `Category`
          </ParamField>

          <ParamField path="ordinal" type="number">
            Weight for columns of type `Ordinal`
          </ParamField>

          <ParamField path="embedding" type="number">
            Weight for columns of type `Embedding` (`List[Number]`).
          </ParamField>

          <ParamField path="multilabel" type="number">
            Weight for columns of type `Multilabel` (`List[Category]`).
          </ParamField>
        </Accordion>
      </ParamField>

      <ParamField path="weights_max" type="number" default="32">
        Maximum weight to scale the normalized columns with.

        Values must be in the following range:

        ```javascript theme={null}
        0 ≤ weights_max < inf
        ```
      </ParamField>

      <ParamField path="weights_exp" type="integer" default="2">
        Weight exponent.
        Weights will be raised to this power before(!) scaling to `weights_max`. This allows for a non-linear
        mapping from input weights to those used eventually to multiply the normalized columns.
      </ParamField>

      <ParamField path="n_neighbors" type="integer" default="100">
        Number of neighbours.
        Use smaller numbers to concentrate on the local structure in the data, and larger values to focus on the
        more global structure.

        For further details see [here](https://umap-learn.readthedocs.io/en/latest/parameters.html#n-neighbors).

        Values must be in the following range:

        ```javascript theme={null}
        1 ≤ n_neighbors < inf
        ```
      </ParamField>

      <ParamField path="min_dist" type="number" default="0.1">
        Minimum distance between reduced data points.
        Controls how tightly UMAP is allowed to pack points together in the reduced space. Smaller values will
        lead to points more tightly packed together (potentially useful if result is used to cluster the points).
        Larger values will distribute points with more space between them (which may be desirable for visualization,
        or to focus more on the global structure of the date).

        For further details see [here](https://umap-learn.readthedocs.io/en/latest/parameters.html#min-dist).

        Values must be in the following range:

        ```javascript theme={null}
        0 ≤ min_dist < inf
        ```
      </ParamField>

      <ParamField path="n_components" type="integer" default="10">
        Dimensionality of the reduced data.

        Values must be in the following range:

        ```javascript theme={null}
        1 ≤ n_components < inf
        ```
      </ParamField>

      <ParamField path="metric" type="string" default="euclidean">
        Metric to use for measuring similarity between data points.

        Values must be one of the following:

        `euclidean` `manhattan` `chebyshev` `minkowski` `canberra` `braycurtis` `haversine` `mahalanobis` `wminkowski` `seuclidean` `cosine` `correlation` `hamming` `jaccard` `dice` `russellrao` `kulsinski` `rogerstanimoto` `sokalmichener` `sokalsneath` `yule`
      </ParamField>

      <ParamField path="n_epochs" type="[integer, null]">
        Number of training iterations used in optimizing the embedding.
        Larger values result in more accurate embeddings. If `null` is specified a value will be
        selected based on the size of the input dataset (200 for large datasets, 500 for small).
      </ParamField>

      <ParamField path="init" type="string" default="auto">
        How to initialize the low dimensional embedding.
        When "spectral", uses a (relatively expensive) spectral embedding. "pca" uses the first `n_components`
        from a principal component analysis. "tswspectral" is a cheaper alternative to "spectral". When "random",
        assigns initial embedding positions at random. This uses the least amount of memory and time but may make UMAP
        slower to converge on the optimal embedding. "auto" selects between "spectral" and "random" automatically
        depending on the size of the dataset.

        Values must be one of the following:

        * `spectral`
        * `pca`
        * `tswspectral`
        * `random`
        * `auto`
      </ParamField>

      <ParamField path="low_memory" type="[boolean, string, null]" default="auto">
        Avoid excessive memory use.
        For some datasets nearest neighbor computations can consume a lot of memory. If you find
        the step is failing due to memory constraints, consider setting this option to `true`.
        This approach is more computationally expensive, but avoids excessive memory use. Setting
        it to "auto", will enable this mode automatically depending on the size of the dataset.

        Values must be one of the following:

        * `True`
        * `False`
        * `auto`
        * `None`
      </ParamField>

      <ParamField path="target" type="[string, null]">
        Target variable (labels) for supervised dimensionality reduction.
        Name of the column that contains your target values (labels).
      </ParamField>

      <ParamField path="target_weight" type="number" default="0.5">
        Weighting factor between features and target.
        A value of 0.0 weights entirely on data, and a value of 1.0 weights entirely on target. The
        default of 0.5 balances the weighting equally between data and target.
      </ParamField>

      <ParamField path="densmap" type="boolean" default="false">
        Try to better preserve local densities in the data.
        Specifies whether the density-augmented objective of densMAP should be used for optimization.
        Turning on this option generates an embedding where the local densities are encouraged to be
        correlated with those in the original space.
      </ParamField>

      <ParamField path="dens_lambda" type="number" default="2.0">
        Strength of local density preservation.
        Controls the regularization weight of the density correlation term in densMAP. Higher values
        prioritize density preservation over the UMAP objective, and vice versa for values closer to zero.
        Setting this parameter to zero is equivalent to running the original UMAP algorithm.
      </ParamField>

      <ParamField path="unique" type="boolean" default="false">
        Drop duplicate rows before embedding.
        If you have more duplicates than you have `n_neighbors` you can have the identical data points lying
        in different regions of your space. It also violates the definition of a metric. This option will
        remove duplicates before embedding, and then map the original data points back to the reduced space. Duplicate
        data points will be placed in the exact same location as the original data points.
      </ParamField>

      <ParamField path="random_state" type="[integer, null]" default="42">
        A random number to initialize the algorithm for reproducibility.
      </ParamField>
    </Accordion>
  </ParamField>
</Accordion>
