Class Art2aFloatClusteringResult

java.lang.Object
de.unijena.cheminf.clustering.art2a.abstractResult.Art2aAbstractResult
de.unijena.cheminf.clustering.art2a.results.Art2aFloatClusteringResult
All Implemented Interfaces:
IArt2aClusteringResult

public class Art2aFloatClusteringResult extends Art2aAbstractResult
Result class for float clustering.
  • Constructor Details

    • Art2aFloatClusteringResult

      public Art2aFloatClusteringResult(float aVigilanceParameter, int aNumberOfEpochs, int aNumberOfDetectedClusters, int[] aClusterView, float[][] aClusterMatrix, float[][] aDataMatrix, ConcurrentLinkedQueue<String> aClusteringProcessQueue, ConcurrentLinkedQueue<String> aClusteringResultQueue) throws NullPointerException, IllegalArgumentException
      Constructor.
      Parameters:
      aVigilanceParameter - parameter to influence the number of clusters.
      aNumberOfEpochs - final epoch number.
      aNumberOfDetectedClusters - final number of detected clusters.
      aClusteringProcessQueue - clustering result (process) queue of typ String. The queue is required to be able to export the cluster results. If it is not specified, they are set to null and export is not possible.
      aClusteringResultQueue - clustering result queue of typ String. See #aClusteringProcessQueue
      aClusterView - array for cluster assignment of each input vector.
      aClusterMatrix - float cluster vector matrix. All cluster vectors created after float ART-2a clustering are stored in this matrix.
      aDataMatrix - float matrix with all input vectors/fingerprints. Each row in the matrix corresponds to an input vector.
      Throws:
      NullPointerException - is thrown, if the specified matrices are null.
      IllegalArgumentException - is thrown, if the specified vigilance parameter is invalid.
    • Art2aFloatClusteringResult

      public Art2aFloatClusteringResult(float aVigilanceParameter, int aNumberOfEpochs, int aNumberOfDetectedClusters, int[] aClusterView, float[][] aClusterMatrix, float[][] aDataMatrix) throws NullPointerException
      Constructor.
      Parameters:
      aVigilanceParameter - parameter to influence the number of clusters.
      aNumberOfEpochs - final epoch number.
      aNumberOfDetectedClusters - final number of detected clusters.
      aClusterView - array for cluster assignment of each input vector.
      aClusterMatrix - float cluster vector matrix. All cluster vectors created after float Art-2a clustering are stored in this matrix.
      aDataMatrix - float matrix with all input vectors/fingerprints. Each row in the matrix corresponds to an input vector.
      Throws:
      NullPointerException - is thrown, if the specified matrices are null.
      IllegalArgumentException - is thrown, if the specified vigilance parameter is invalid.

      See Also:
  • Method Details

    • getVigilanceParameter

      public Float getVigilanceParameter()
      Returns the vigilance parameter of the clustering algorithm.
      Returns:
      float vigilance parameter
    • getClusterRepresentatives

      public int getClusterRepresentatives(int aClusterNumber) throws IllegalArgumentException
      Calculates the cluster representative. This means that the input that is most similar to the cluster vector is determined.
      Parameters:
      aClusterNumber - Cluster number for which the representative is to be calculated.
      Returns:
      int input indices of the representative input in the cluster.
      Throws:
      IllegalArgumentException - is thrown if the given cluster number is invalid.
    • getAngleBetweenClusters

      public Float getAngleBetweenClusters(int aFirstCluster, int aSecondCluster) throws IllegalArgumentException
      Calculates the angle between two clusters. The angle between the clusters defines the distance between them. Since all vectors are normalized to unit vectors in the first step of clustering and only positive components are allowed, they all lie in the positive quadrant of the unit sphere, so the maximum distance between two clusters can be 90 degrees.
      Parameters:
      aFirstCluster - first cluster
      aSecondCluster - second cluster
      Returns:
      generic angle double or float.
      Throws:
      IllegalArgumentException - if the given parameters are invalid.