Feedback:

fit birch

Use the birch algorithm when you want to divide data points into separate clusters using the scikit-learn BIRCH (balanced iterative reducing and clustering using hierarchies) algorithm.

Syntax

fit birch [option_name]=[value] [into '<model_name>']

[option_name]=[value]

Specify model parameters:

  • k=<int>: Specify the total number of clusters into which the data is segmented after the concluding clustering process, during which the subclusters originating from the CF tree's leaves are treated as fresh samples.

  • partial_fit={true|false}: Specify whether an existing model should be updated incrementally or not. It enables the modification of an existing model with new data alone, eliminating the need to retrain it on the entire training data set.

into Specify the into keyword to store the learned model in an artifact that can later be applied to new search results with the apply operator.
'<model_name>'

Specify the name of the model to save as an artifact, so that it can be used with the apply operator. The model name must be wrapped with single or double straight quotation marks.

Usage

You can use the birch algorithm to divide data points into separate clusters. The algorithm assigns each event to a cluster and records this assignment in a newly created field called "cluster". This algorithm supports incremental fitting.

For information about the BIRCH algorithm, refer to scikit-learn documentation:

https://scikit-learn.org/stable/modules/clustering.html#birch

Examples

Example 1: Cluster data using BIRCH algorithm.

Copy
|fit Birch k=3 from petal_length petal_width sepal_length sepal_widths

Example 2: Apply hierarchical clustering with parameters.

Copy
|fit Birch k=3 from petal_length petal_width sepal_length sepal_width into "birch_model"