Class Art2aClusteringTask
java.lang.Object
de.unijena.cheminf.clustering.art2a.Art2aClusteringTask
- All Implemented Interfaces:
Callable<IArt2aClusteringResult>
Callable class for clustering input vectors (fingerprints).
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
Default value of the learning parameter in doublestatic final float
Default value of the learning parameter in floatstatic final double
Default value of the required similarity parameter in doublestatic final float
Default value of the required similarity parameter in float -
Constructor Summary
ConstructorDescriptionArt2aClusteringTask
(double aVigilanceParameter, double[][] aDataMatrix, int aMaximumEpochsNumber, boolean anIsClusteringResultExported) Double clustering task constructor.Art2aClusteringTask
(double aVigilanceParameter, double[][] aDataMatrix, int aMaximumEpochsNumber, boolean anIsClusteringResultExported, double aRequiredSimilarity, double aLearningParameter) Double clustering task constructor.Art2aClusteringTask
(float aVigilanceParameter, float[][] aDataMatrix, int aMaximumEpochsNumber, boolean anIsClusteringResultExported) Float clustering task constructor.Art2aClusteringTask
(float aVigilanceParameter, float[][] aDataMatrix, int aMaximumEpochsNumber, boolean anIsClusteringResultExported, float aRequiredSimilarity, float aLearningParameter) Float clustering task constructor. -
Method Summary
-
Field Details
-
DEFAULT_LEARNING_PARAMETER_FLOAT
public static final float DEFAULT_LEARNING_PARAMETER_FLOATDefault value of the learning parameter in float- See Also:
-
REQUIRED_SIMILARITY_FLOAT
public static final float REQUIRED_SIMILARITY_FLOATDefault value of the required similarity parameter in float- See Also:
-
DEFAULT_LEARNING_PARAMETER_DOUBLE
public static final double DEFAULT_LEARNING_PARAMETER_DOUBLEDefault value of the learning parameter in double- See Also:
-
REQUIRED_SIMILARITY_DOUBLE
public static final double REQUIRED_SIMILARITY_DOUBLEDefault value of the required similarity parameter in double- See Also:
-
-
Constructor Details
-
Art2aClusteringTask
public Art2aClusteringTask(float aVigilanceParameter, float[][] aDataMatrix, int aMaximumEpochsNumber, boolean anIsClusteringResultExported, float aRequiredSimilarity, float aLearningParameter) throws IllegalArgumentException, NullPointerException Float clustering task constructor. Creates a new Art2aClusteringTask instance with the specified parameters.- Parameters:
aVigilanceParameter
- parameter to influence the number of clusters.aDataMatrix
- matrix contains all inputs for clustering. Each row of the matrix contains one input. In addition, all inputs must have the same length. Each column of the matrix contains one component of the input.aMaximumEpochsNumber
- maximum number of epochs that the system may use for convergence.anIsClusteringResultExported
- if the parameter is set to true, the cluster results are exported to text files.aRequiredSimilarity
- parameter indicating the minimum similarity between the current cluster vectors and the previous cluster vectors. The parameter is crucial for the convergence of the system. If the parameter is set too high, a much more accurate similarity is expected and the convergence may take longer, while a small parameter expects a lower similarity between the cluster vectors and thus the system may converge faster.aLearningParameter
- parameter to define the intensity of keeping the old cluster vector in mind before the system adapts it to the new sample vector.- Throws:
IllegalArgumentException
- is thrown, if the given arguments are invalid. The checking of the arguments is done in the constructor of Art2aFloatClustering.NullPointerException
- is thrown, if the given aDataMatrix is null. The checking of the data matrix is done in the constructor of the ArtaFloatClustering.
-
Art2aClusteringTask
public Art2aClusteringTask(float aVigilanceParameter, float[][] aDataMatrix, int aMaximumEpochsNumber, boolean anIsClusteringResultExported) throws IllegalArgumentException, NullPointerException Float clustering task constructor. Creates a new Art2aClusteringTask instance with the specified parameters. For the required similarity and learning parameter default values are used.- Parameters:
aVigilanceParameter
- parameter to influence the number of clusters.aDataMatrix
- matrix contains all inputs for clustering. Each row of the matrix contains one input. In addition, all inputs must have the same length. Each column of the matrix contains one component of the input.aMaximumEpochsNumber
- maximum number of epochs that the system may use for convergence.anIsClusteringResultExported
- if the parameter is set to true, the cluster results are exported to text files.- Throws:
IllegalArgumentException
- is thrown, if the given arguments are invalid. The checking of the arguments is done in the constructor of Art2aFloatClustering.NullPointerException
- is thrown, if the given aDataMatrix is null. The checking of the data matrix is done in the constructor of the ArtaFloatClustering.- See Also:
-
Art2aClusteringTask
public Art2aClusteringTask(double aVigilanceParameter, double[][] aDataMatrix, int aMaximumEpochsNumber, boolean anIsClusteringResultExported, double aRequiredSimilarity, double aLearningParameter) throws IllegalArgumentException, NullPointerException Double clustering task constructor. Creates a new Art2aDoubleClustering instance with the specified parameters.- Parameters:
aVigilanceParameter
- parameter to influence the number of clusters.aDataMatrix
- matrix contains all inputs for clustering. Each row of the matrix contains one input. In addition, all inputs must have the same length. Each column of the matrix contains one component of the input.aMaximumEpochsNumber
- maximum number of epochs that the system may use for convergence.anIsClusteringResultExported
- if the parameter is set to true, the cluster results are exported to text files.aRequiredSimilarity
- parameter indicating the minimum similarity between the current cluster vectors and the previous cluster vectors.aLearningParameter
- parameter to define the intensity of keeping the old cluster vector in mind before the system adapts it to the new sample vector.- Throws:
IllegalArgumentException
- is thrown, if the given arguments are invalid. The checking of the arguments is done in the constructor of Art2aFloatClustering.NullPointerException
- is thrown, if the given aDataMatrix is null. The checking of the data matrix is done in the constructor of the ArtaFloatClustering.
-
Art2aClusteringTask
public Art2aClusteringTask(double aVigilanceParameter, double[][] aDataMatrix, int aMaximumEpochsNumber, boolean anIsClusteringResultExported) throws IllegalArgumentException, NullPointerException Double clustering task constructor. Creates a new Art2aDoubleClustering instance with the specified parameters. For the required similarity and learning parameter default values are used.- Parameters:
aVigilanceParameter
- parameter to influence the number of clusters.aDataMatrix
- matrix contains all inputs for clustering. Each row of the matrix contains one input. In addition, all inputs must have the same length. Each column of the matrix contains one component of the input.aMaximumEpochsNumber
- maximum number of epochs that the system may use for convergence.anIsClusteringResultExported
- if the parameter is set to true, the cluster results are exported to text files.- Throws:
IllegalArgumentException
- is thrown, if the given arguments are invalid. The checking of the arguments is done in the constructor of Art2aFloatClustering.NullPointerException
- is thrown, if the given aDataMatrix is null. The checking of the data matrix is done in the constructor of the ArtaFloatClustering.- See Also:
-
-
Method Details
-
call
Executes the clustering.- Specified by:
call
in interfaceCallable<IArt2aClusteringResult>
- Returns:
- clustering result.
-
setSeed
public int setSeed(int aSeed) User-defined seed value to randomize input vectors. Different seed values can lead to different clustering results.- Parameters:
aSeed
- seed value- Returns:
- user-defined seed value.
-