onion_clustering.onion_multi.onion_multi

onion_clustering.onion_multi.onion_multi(X, ndims=2, bins='auto', number_of_sigmas=2.0)[source]

Performs onion clustering from data array.

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

  • bins (int, default="auto") – The number of bins used for the construction of the histograms. Can be an integer value, or “auto”. If “auto”, the default of numpy.histogram_bin_edges is used (see https://numpy.org/doc/stable/reference/generated/numpy.histogram_bin_edges.html#numpy.histogram_bin_edges).

  • number_of_sigmas (float, default=2.0) – Sets the thresholds for classifing a signal window inside a state: the window is contained in the state if it is entirely contained inside number_of_sigma * state.sigms times from state.mean.

  • ndims (int)

Returns:

  • states_list (List[StateMulti]) – The list of the identified states.

  • labels (ndarray of shape (n_particles * n_windows,)) – Cluster labels for each point. Unclassified points are given the label -1.