Просмотр исходного кода

JDoc comments for ClusteringOptions

Simon Ding 4 лет назад
Родитель
Сommit
380b501569
1 измененных файлов с 65 добавлено и 0 удалено
  1. 65 0
      jplag/src/main/java/de/jplag/clustering/ClusteringOptions.java

+ 65 - 0
jplag/src/main/java/de/jplag/clustering/ClusteringOptions.java

@@ -4,6 +4,9 @@ package de.jplag.clustering;
 import de.jplag.clustering.algorithm.AgglomerativeClustering;
 import de.jplag.clustering.algorithm.AgglomerativeClustering;
 import de.jplag.options.SimilarityMetric;
 import de.jplag.options.SimilarityMetric;
 
 
+/**
+ * Collection of all possible parameters that describe how a clustering should be performed.
+ */
 public class ClusteringOptions {
 public class ClusteringOptions {
 
 
     public static final ClusteringOptions DEFAULTS = new Builder().build();
     public static final ClusteringOptions DEFAULTS = new Builder().build();
@@ -22,54 +25,116 @@ public class ClusteringOptions {
     private final float preprocessorThreshold;
     private final float preprocessorThreshold;
     private final float preprocessorPercentile;
     private final float preprocessorPercentile;
 
 
+    /**
+     * @return The similarity metric is used for clustering
+     */
     public SimilarityMetric getSimilarityMetric() {
     public SimilarityMetric getSimilarityMetric() {
         return similarityMetric;
         return similarityMetric;
     }
     }
 
 
+    /**
+     * The kernel bandwidth for the matern kernel used in the gaussian process for the automatic search for the number of clusters in spectral clustering.
+     * Affects the runtime and results of the spectral clustering.
+     * 
+     * @return kernel bandwidth for spectral clustering
+     */
     public float getSpectralKernelBandwidth() {
     public float getSpectralKernelBandwidth() {
         return spectralKernelBandwidth;
         return spectralKernelBandwidth;
     }
     }
 
 
+    /**
+     * This is the assumed level of noise in the evaluation results of a spectral clustering.
+     * Acts as normalization parameter for the Gaussian Process.
+     * The default setting works well with similarity scores in the range between zero and one.
+     * Affects the results of the spectral clustering.
+     * 
+     * @return assumed variance of noise in Gaussian Process during spectral clustering.
+     */
     public float getSpectralGaussianProcessVariance() {
     public float getSpectralGaussianProcessVariance() {
         return spectralGaussianProcessVariance;
         return spectralGaussianProcessVariance;
     }
     }
 
 
+    /**
+     * The minimal number of times the kMeans algorithm is run for the spectral clustering.
+     * These runs will use predefined numbers of clusters and will not use the bayesian optimization to determine the number of clusters.
+     * @return minimal kMeans runs during spectral clustering
+     */
     public int getSpectralMinRuns() {
     public int getSpectralMinRuns() {
         return spectralMinRuns;
         return spectralMinRuns;
     }
     }
 
 
+    /**
+     * The maximal number of times the kMeans algorithm is run during the bayesian optimization for spectral clustering.
+     * The bayesian optimization may be stopped before, when no more maxima of the acquisition-function are found.
+     * 
+     * @return maximal kMeans runs during spectral clustering
+     */
     public int getSpectralMaxRuns() {
     public int getSpectralMaxRuns() {
         return spectralMaxRuns;
         return spectralMaxRuns;
     }
     }
 
 
+    /**
+     * Maximum number of iterations of the kMeans clustering per run during spectral clustering.
+     * 
+     * @return maximal kMeans iterations
+     */
     public int getSpectralMaxKMeansIterationPerRun() {
     public int getSpectralMaxKMeansIterationPerRun() {
         return spectralMaxKMeansIterationPerRun;
         return spectralMaxKMeansIterationPerRun;
     }
     }
 
 
+    /**
+     * Agglomerative clustering will merge clusters that have a similarity higher than this threshold.
+     * 
+     * @return merging threshold for agglomerative clustering
+     */
     public float getAgglomerativeThreshold() {
     public float getAgglomerativeThreshold() {
         return agglomerativeThreshold;
         return agglomerativeThreshold;
     }
     }
 
 
+    /**
+     * 
+     * Preprocessing for the similarity values before clustering.
+     * Preprocessing is mandatory for spectral clustering and optional for agglomerative clustering.
+     * 
+     * @return preprocessor
+     */
     public Preprocessors getPreprocessor() {
     public Preprocessors getPreprocessor() {
         return preprocessor;
         return preprocessor;
     }
     }
 
 
+    /**
+     * @return whether clustering should be performed
+     */
     public boolean isEnabled() {
     public boolean isEnabled() {
         return enabled;
         return enabled;
     }
     }
 
 
+    /**
+     * @return the clustering algorithm to use
+     */
     public ClusteringAlgorithm getAlgorithm() {
     public ClusteringAlgorithm getAlgorithm() {
         return algorithm;
         return algorithm;
     }
     }
 
 
+    /**
+     * Similarity measure between clusters in agglomerative clustering. 
+     * 
+     * @return similarity measure
+     */
     public AgglomerativeClustering.InterClusterSimilarity getAgglomerativeInterClusterSimilarity() {
     public AgglomerativeClustering.InterClusterSimilarity getAgglomerativeInterClusterSimilarity() {
         return agglomerativeInterClusterSimilarity;
         return agglomerativeInterClusterSimilarity;
     }
     }
 
 
+    /**
+     * @return up to which similarity the threshold-preprocessor zeroes out the similarities
+     */
     public float getPreprocessorThreshold() {
     public float getPreprocessorThreshold() {
         return preprocessorThreshold;
         return preprocessorThreshold;
     }
     }
 
 
+    /**
+     * @return up to which percentile of similarities the percentile-preprocessor zeroes out the similarities
+     */
     public float getPreprocessorPercentile() {
     public float getPreprocessorPercentile() {
         return preprocessorPercentile;
         return preprocessorPercentile;
     }
     }