artlib.elementary.ART2

ART2 [2], [3].

==================================================================
DISCLAIMER: DO NOT USE ART2!!!
IT DOES NOT WORK
It is provided for completeness only.
Stephan Grossberg himself has said ART2 does not work.
==================================================================

Classes

ART2A

ART2-A for Clustering.

Module Contents

class artlib.elementary.ART2.ART2A(rho: float, alpha: float, beta: float)

Bases: artlib.common.BaseART.BaseART

ART2-A for Clustering.

This module implements ART2-A as first published in: [2], [3]

ART2-A is similar to ART1 but designed for analog data. This method is implemented for historical purposes and is not recommended for use.

static validate_params(params: dict)

Validate clustering parameters.

Parameters:

params (dict) – Dictionary containing parameters for the algorithm.

check_dimensions(X: numpy.ndarray)

Check that the data has the correct dimensions.

Parameters:

X (np.ndarray) – The dataset.

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:
  • i (np.ndarray) – Data sample.

  • w (np.ndarray) – Cluster weight or information.

  • params (dict) – Dictionary containing parameters for the algorithm.

  • cache (dict, optional) – Cache containing values from previous calculations.

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.

Parameters:
  • i (np.ndarray) – Data sample.

  • w (np.ndarray) – Cluster weight or information.

  • params (dict) – Dictionary containing parameters for the algorithm.

  • cache (dict, optional) – Cache containing values from previous calculations.

Returns:

Updated cluster weight.

Return type:

np.ndarray

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:

Updated 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