artlib.elementary.GaussianART
Gaussian ART [7].
Classes
Gaussian ART for Clustering. |
Module Contents
- class artlib.elementary.GaussianART.GaussianART(rho: float, sigma_init: numpy.ndarray, alpha: float = 1e-10)
Bases:
artlib.common.BaseART.BaseARTGaussian ART for Clustering.
This module implements Gaussian ART as first published in: [7].
Guassian ART clusters data in Gaussian Distributions (Hyper-ellipsoids) and is similar to
BayesianARTbut differs in that the hyper-ellipsoid always have their principal axes square to the coordinate frame. It is also faster thanBayesianART.- static validate_params(params: dict)
Validate clustering parameters.
- Parameters:
params (dict) – Dictionary containing parameters for the algorithm.
- category_choice(i: numpy.ndarray, w: numpy.ndarray, params: dict) tuple[float, dict | None]
Get the activation of the cluster.
- Parameters:
i (np.ndarray) – Data sample.
w (np.ndarray) – Cluster weight or information.
params (dict) – Dictionary containing parameters for the algorithm.
- Returns:
float – Cluster activation.
dict, optional – Cache used for later processing.
- match_criterion(i: numpy.ndarray, w: numpy.ndarray, params: dict, cache: dict | None = None) Tuple[float, Dict | None]
Get the match criterion of the cluster.
- Parameters:
- Returns:
float – Cluster match criterion.
dict – Cache used for later processing.
- update(i: numpy.ndarray, w: numpy.ndarray, params: dict, cache: dict | None = None) numpy.ndarray
Get the updated cluster weight.
- new_weight(i: numpy.ndarray, params: dict) numpy.ndarray
Generate a new cluster weight.
- Parameters:
i (np.ndarray) – Data sample.
params (dict) – Dictionary containing parameters for the algorithm.
- Returns:
New cluster weight.
- Return type:
np.ndarray
- get_cluster_centers() List[numpy.ndarray]
Get the centers of each cluster, used for regression.
- Returns:
Cluster centroids.
- Return type:
list of np.ndarray
- plot_cluster_bounds(ax: matplotlib.axes.Axes, colors: Iterable, linewidth: int = 1)
Visualize the bounds of each cluster.
- Parameters:
ax (matplotlib.axes.Axes) – Figure axes.
colors (IndexableOrKeyable) – Colors to use for each cluster.
linewidth (int, optional) – Width of boundary line, by default 1.