FromFileSimpleVote

class tsml_eval.estimators.clustering.consensus.FromFileSimpleVote(clusterers, n_clusters=8, overwrite_y=False, skip_y_check=False, random_state=None)[source]

SimpleVote clustering ensemble.

Parameters:
clustererslist of str

A list of paths to the clusterer result files to use in the ensemble.

n_clustersint, default=8

The number of clusters to form.

overwrite_ybool, default=False

If True, the labels in the loaded files will overwrite the labels passed in the fit method.

skip_y_checkbool, default=False

If True, the labels in the loaded files will not be checked against the labels passed in the fit method.

random_stateint, default=None

The seed for random number generation.

Attributes:
labels_ndarray of shape (n_instances,)

Labels of each point from the last fit.

Methods

fit(X[, y])

Fit model to X using a simple vote ensemble.

fit_predict(X[, y])

Perform clustering on X and returns cluster labels.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

predict(X)

Predict cluster labels for X.

predict_proba(X)

Predict cluster probabilities for X.

set_params(**params)

Set the parameters of this estimator.

fit(X, y=None)[source]

Fit model to X using a simple vote ensemble.

predict_proba(X)[source]

Predict cluster probabilities for X.

fit_predict(X, y=None, **kwargs)[source]

Perform clustering on X and returns cluster labels.

Parameters:
Xarray-like of shape (n_samples, n_features)

Input data.

yIgnored

Not used, present for API consistency by convention.

**kwargsdict

Arguments to be passed to fit.

Added in version 1.4.

Returns:
labelsndarray of shape (n_samples,), dtype=np.int64

Cluster labels.

get_metadata_routing()[source]

Get metadata routing of this object.

Please check User Guide on how the routing mechanism works.

Returns:
routingMetadataRequest

A MetadataRequest encapsulating routing information.

get_params(deep=True)[source]

Get parameters for this estimator.

Parameters:
deepbool, default=True

If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:
paramsdict

Parameter names mapped to their values.

predict(X)[source]

Predict cluster labels for X.

set_params(**params)[source]

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Parameters:
**paramsdict

Estimator parameters.

Returns:
selfestimator instance

Estimator instance.