Loading...

vastorbit.machine_learning.vast.automl.AutoClustering

class vastorbit.machine_learning.vast.automl.AutoClustering(name: str | None = None, overwrite_model: bool = False, n_clusters: int | None = None, init: Literal['k-means++', 'random'] | Annotated[list | ndarray, 'Array Like Structure'] = 'k-means++', max_iter: int = 300, tol: float = 0.0001, preprocess_data: bool = True, preprocess_dict: dict | None = None, print_info: bool = True)

Automatically creates k different groups with which to generalize the data.

Parameters:
  • name (str, optional) – Name of the model.

  • overwrite_model (bool, optional) – If set to True, training a model with the same name as an existing model overwrites the existing model.

  • n_clusters (int, optional) – Number of clusters. If empty, an optimal number of clusters are determined using multiple k-means models.

  • init (str | list, optional) –

    The method for finding the initial cluster centers.
    k-means++Uses the k-means++ method to

    initialize the centers.

    randomRandomly subsamples the data to find

    initial centers.

    Alternatively, you can specify a list with the initial cluster centers.

  • max_iter (int, optional) – The maximum number of iterations for the algorithm.

  • tol (float, optional) – Determines whether the algorithm has converged. The algorithm is considered converged after no center has moved more than a distance of ‘tol’ from the previous iteration.

  • preprocess_data (bool, optional) – If True, the data will be preprocessed.

  • preprocess_dict (dict, optional) – Dictionary to pass to the AutoDataPrep class in order to preprocess the data before clustering.

  • print_info (bool) – If True, prints the model information at each step.

Variables:
  • preprocess_ (object) – Model used to preprocess the data.

  • model_ (object) – Final model used for clustering.

__init__(name: str | None = None, overwrite_model: bool = False, n_clusters: int | None = None, init: Literal['k-means++', 'random'] | Annotated[list | ndarray, 'Array Like Structure'] = 'k-means++', max_iter: int = 300, tol: float = 0.0001, preprocess_data: bool = True, preprocess_dict: dict | None = None, print_info: bool = True) None

Methods

__init__([name, overwrite_model, ...])

contour([nbins, chart])

Draws the model's contour plot.

deploySQL([X])

Returns the SQL code needed to deploy the model.

drop()

Drops the model from the VAST DataBase.

export_models(name, path[, kind])

Exports machine learning models.

fit(input_relation[, X, return_report])

Trains the model.

get_attributes([attr_name])

Returns the model attributes.

get_match_index(x, col_list[, str_check])

Returns the matching index.

get_params()

Returns the parameters of the model.

get_plotting_lib([class_name, chart, ...])

Returns the first available library (Plotly, Matplotlib) to draw a specific graphic.

import_models(path[, schema, kind])

Imports machine learning models.

set_params([parameters])

Sets the parameters of the model.

summarize()

Summarizes the model.

to_binary(path)

Exports the model to the VAST Binary format.

to_python([return_proba, ...])

Returns the Python function needed for in-memory scoring without using built-in VAST functions.

to_sql([X, return_proba, ...])

Returns the SQL code needed to deploy the model without using built-in VAST functions.

Attributes

object_type