tropea_clustering._internal.onion_smooth.first_classes.StateMulti

class tropea_clustering._internal.onion_smooth.first_classes.StateMulti(mean, covariance, log_likelihood, number_of_sigmas, perc=0.0)[source]

Represents a multifimensional state as a factorized Gaussian.

All the parameters and information on the factorized Gaussian states corresponding to the different clusters are stored within this class. The attributes can be acessed using the get_attributes() method.

Parameters:
  • mean (np.ndarray of shape (dim,)) – Mean of the Gaussians.

  • covariance (np.ndarray of shape (dim, dim)) – Covariance matrix of the Gaussians.

  • log_likelihood (float) – log_likelihood of the data under the fitted Gaussian.

  • number_of_sigmas (float)

  • perc (float)

perc

Fraction of data points classified in this state.

Type:

float

axis

The thresholds of the state. It contains the axis of the ellipsoid given by the rescaled sigmas of the factorized Gaussian states, multiplied by “number of sigmas”.

Type:

ndarray of shape (dim,)

Methods

get_attributes

Returns a dictionary containing the attributes of the state.

get_boundaries

Sets the thresholds to classify the data windows inside the state.

Attributes

perc

mean

covariance

log_likelihood

number_of_sigmas

get_attributes()[source]

Returns a dictionary containing the attributes of the state.

Returns:

attr_list

Return type:

dict

get_boundaries()[source]

Sets the thresholds to classify the data windows inside the state.

Parameters:

sigmas (number of) – How many sigmas the thresholds are far from the mean.

Return type:

tuple[float, float, float]