Class KmeansSamplingFactory<I extends INumericLabeledAttributeArrayInstance<? extends java.lang.Number>,​D extends IDataset<I>>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      KmeansSampling<I,​D> getAlgorithm​(int sampleSize, D inputDataset, java.util.Random random)
      After the necessary config is done, this method returns a fully configured instance of a sampling algorithm.
      void setClusterSeed​(long clusterSeed)
      Set the seed the clustering will use for initialization.
      void setDistanceMeassure​(org.apache.commons.math3.ml.distance.DistanceMeasure distanceMeassure)
      Set the distance measure for the clustering.
      void setK​(int k)
      Set how many clusters shall be created.
      void setPreviousRun​(KmeansSampling<I,​D> previousRun)
      Set the previous run of the sampling algorithm, if one occurred, can be set here to get data from it.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KmeansSamplingFactory

        public KmeansSamplingFactory()
    • Method Detail

      • setK

        public void setK​(int k)
        Set how many clusters shall be created. Default is the sample size;
        Parameters:
        k - Parameter k of k-means.
      • setClusterSeed

        public void setClusterSeed​(long clusterSeed)
        Set the seed the clustering will use for initialization. Default is without a fix seed and the system time instead.
        Parameters:
        clusterSeed -
      • setDistanceMeassure

        public void setDistanceMeassure​(org.apache.commons.math3.ml.distance.DistanceMeasure distanceMeassure)
        Set the distance measure for the clustering. Default is the Manhattan distance.
        Parameters:
        distanceMeassure -