artlib.elementary.QuadraticNeuronART ==================================== .. py:module:: artlib.elementary.QuadraticNeuronART .. autoapi-nested-parse:: Quadratic Neuron ART :cite:`su2001application`, :cite:`su2005new`. Classes ------- .. autoapisummary:: artlib.elementary.QuadraticNeuronART.QuadraticNeuronART Module Contents --------------- .. py:class:: QuadraticNeuronART(rho: float, s_init: float, lr_b: float, lr_w: float, lr_s: float) Bases: :py:obj:`artlib.common.BaseART.BaseART` Quadratic Neuron ART for Clustering. This module implements Quadratic Neuron ART as first published in: :cite:`su2001application`, :cite:`su2005new`. .. # Su, M.-C., & Liu, T.-K. (2001). .. # Application of neural networks using quadratic junctions in cluster analysis. .. # Neurocomputing, 37, 165 – 175. doi:10.1016/S0925-2312(00)00343-X. .. # Su, M.-C., & Liu, Y.-C. (2005). .. # A new approach to clustering data with arbitrary shapes. .. # Pattern Recognition, 38, 1887 – 1901. doi:10.1016/j.patcog.2005.04.010. Quadratic Neuron ART clusters data in Hyper-ellipsoid by utilizing a quadratic neural network for activation and resonance. .. 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, cache used for later processing. :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