Class Art2aDoubleClusteringResult
java.lang.Object
de.unijena.cheminf.clustering.art2a.abstractResult.Art2aAbstractResult
de.unijena.cheminf.clustering.art2a.results.Art2aDoubleClusteringResult
- All Implemented Interfaces:
IArt2aClusteringResult
Result class for the double clustering.
-
Constructor Summary
ConstructorDescriptionArt2aDoubleClusteringResult
(double aVigilanceParameter, int aNumberOfEpochs, int aNumberOfDetectedClusters, int[] aClusterView, double[][] aClusterMatrix, double[][] aDataMatrix) Constructor.Art2aDoubleClusteringResult
(double aVigilanceParameter, int aNumberOfEpochs, int aNumberOfDetectedClusters, int[] aClusterView, double[][] aClusterMatrix, double[][] aDataMatrix, ConcurrentLinkedQueue<String> aClusteringProcessQueue, ConcurrentLinkedQueue<String> aClusteringResultQueue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetAngleBetweenClusters
(int aFirstCluster, int aSecondCluster) Calculates the angle between two clusters.int
getClusterRepresentatives
(int aClusterNumber) Calculates the cluster representative.Returns the vigilance parameter of the clustering algorithm.Methods inherited from class de.unijena.cheminf.clustering.art2a.abstractResult.Art2aAbstractResult
exportClusteringResultsToTextFiles, getClusterIndices, getNumberOfDetectedClusters, getNumberOfEpochs
-
Constructor Details
-
Art2aDoubleClusteringResult
public Art2aDoubleClusteringResult(double aVigilanceParameter, int aNumberOfEpochs, int aNumberOfDetectedClusters, int[] aClusterView, double[][] aClusterMatrix, double[][] 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 ty 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
- cluster vector matrix. All cluster vectors created after double ART-2a clustering are stored in this matrix.aDataMatrix
- 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.
-
Art2aDoubleClusteringResult
public Art2aDoubleClusteringResult(double aVigilanceParameter, int aNumberOfEpochs, int aNumberOfDetectedClusters, int[] aClusterView, double[][] aClusterMatrix, double[][] 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
- double cluster vector matrix. All cluster vectors created after double ART-2a clustering are stored in this matrix.aDataMatrix
- double 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
Returns the vigilance parameter of the clustering algorithm.- Returns:
- float vigilance parameter
-
getClusterRepresentatives
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 Double 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 clusteraSecondCluster
- second cluster- Returns:
- generic angle double or float.
- Throws:
IllegalArgumentException
- if the given parameters are invalid.
-