artlib.elementary.GaussianART ============================= .. py:module:: artlib.elementary.GaussianART .. autoapi-nested-parse:: Gaussian ART :cite:`williamson1996gaussian`. Classes ------- .. autoapisummary:: artlib.elementary.GaussianART.GaussianART Module Contents --------------- .. py:class:: GaussianART(rho: float, sigma_init: numpy.ndarray, alpha: float = 1e-10) Bases: :py:obj:`artlib.common.BaseART.BaseART` Gaussian ART for Clustering. This module implements Gaussian ART as first published in: :cite:`williamson1996gaussian`. .. # Williamson, J. R. (1996). .. # Gaussian ARTMAP: A Neural Network for Fast Incremental Learning of Noisy .. # Multidimensional Maps. .. # Neural Networks, 9, 881 – 897. doi:10.1016/0893-6080(95)00115-8. Guassian ART clusters data in Gaussian Distributions (Hyper-ellipsoids) and is similar to :class:`~artlib.elementary.BayesianART.BayesianART` but differs in that the hyper-ellipsoid always have their principal axes square to the coordinate frame. It is also faster than :class:`~artlib.elementary.BayesianART.BayesianART`. .. py:method:: validate_params(params: dict) :staticmethod: Validate clustering parameters. :param params: Dictionary containing parameters for the algorithm. :type params: dict .. py:method:: category_choice(i: numpy.ndarray, w: numpy.ndarray, params: dict) -> tuple[float, Optional[dict]] Get the activation of the cluster. :param i: Data sample. :type i: np.ndarray :param w: Cluster weight or information. :type w: np.ndarray :param params: Dictionary containing parameters for the algorithm. :type params: dict :returns: * *float* -- Cluster activation. * *dict, optional* -- Cache used for later processing. .. py:method:: match_criterion(i: numpy.ndarray, w: numpy.ndarray, params: dict, cache: Optional[dict] = None) -> Tuple[float, Optional[Dict]] Get the match criterion of the cluster. :param i: Data sample. :type i: np.ndarray :param w: Cluster weight or information. :type w: np.ndarray :param params: Dictionary containing parameters for the algorithm. :type params: dict :param cache: Cache containing values from previous calculations. :type cache: dict, optional :returns: * *float* -- Cluster match criterion. * *dict* -- Cache used for later processing. .. py:method:: update(i: numpy.ndarray, w: numpy.ndarray, params: dict, cache: Optional[dict] = None) -> numpy.ndarray Get the updated cluster weight. :param i: Data sample. :type i: np.ndarray :param w: Cluster weight or information. :type w: np.ndarray :param params: Dictionary containing parameters for the algorithm. :type params: dict :param cache: Cache containing values from previous calculations. :type cache: dict, optional :returns: Updated cluster weight. :rtype: np.ndarray .. py:method:: new_weight(i: numpy.ndarray, params: dict) -> numpy.ndarray Generate a new cluster weight. :param i: Data sample. :type i: np.ndarray :param params: Dictionary containing parameters for the algorithm. :type params: dict :returns: New cluster weight. :rtype: np.ndarray .. py:method:: get_cluster_centers() -> List[numpy.ndarray] Get the centers of each cluster, used for regression. :returns: Cluster centroids. :rtype: list of np.ndarray .. py:method:: plot_cluster_bounds(ax: matplotlib.axes.Axes, colors: Iterable, linewidth: int = 1) Visualize the bounds of each cluster. :param ax: Figure axes. :type ax: matplotlib.axes.Axes :param colors: Colors to use for each cluster. :type colors: IndexableOrKeyable :param linewidth: Width of boundary line, by default 1. :type linewidth: int, optional