onion_clustering.onion_uni.OnionUni

class onion_clustering.onion_uni.OnionUni(bins='auto', number_of_sigmas=2.0)[source]

Performs onion clustering from data array.

Parameters:
state_list_

List of the identified states.

Type:

List[StateUni]

labels_

Cluster labels for each point. Unclassified points are given the label -1.

Type:

ndarray of shape (n_particles * n_windows,)

Methods

fit

Performs onion clustering from data array.

fit_predict

Computes clusters from a data matrix and predict labels.

get_params

set_params

fit(X, y=None)[source]

Performs onion clustering from data array.

Parameters:

X (ndarray of shape (n_particles * n_windows, tau_window)) – The raw data.

Returns:

self – A fitted instance of self.

Return type:

object

fit_predict(X, y=None)[source]

Computes clusters from a data matrix and predict labels.

Parameters:

X (ndarray of shape (n_particles * n_windows, tau_window)) – The raw data.

Returns:

labels_ – Cluster labels for each point. Unclassified points are given the label -1.

Return type:

ndarray of shape (n_particles * n_windows,)