Class ClusterStratiAssigner

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.commons.math3.ml.distance.DistanceMeasure distanceMeasure  
      protected int randomSeed  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int assignToStrati​(org.api4.java.ai.ml.core.dataset.IInstance datapoint)
      Custom logic for assigning datapoints into strati.
      java.util.List<org.apache.commons.math3.ml.clustering.CentroidCluster<org.apache.commons.math3.ml.clustering.Clusterable>> getClusters()  
      int getNumCPUs()  
      protected void setClusters​(java.util.List<org.apache.commons.math3.ml.clustering.CentroidCluster<org.apache.commons.math3.ml.clustering.Clusterable>> clusters)  
      void setDataset​(org.api4.java.ai.ml.core.dataset.IDataset<?> dataset)  
      void setNumCPUs​(int numberOfCPUs)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface ai.libs.jaicore.ml.core.filter.sampling.inmemory.stratified.sampling.IStratiAssigner

        init
    • Field Detail

      • randomSeed

        protected int randomSeed
      • distanceMeasure

        protected org.apache.commons.math3.ml.distance.DistanceMeasure distanceMeasure
    • Constructor Detail

      • ClusterStratiAssigner

        public ClusterStratiAssigner()
    • Method Detail

      • setDataset

        public void setDataset​(org.api4.java.ai.ml.core.dataset.IDataset<?> dataset)
      • assignToStrati

        public int assignToStrati​(org.api4.java.ai.ml.core.dataset.IInstance datapoint)
        Description copied from interface: IStratiAssigner
        Custom logic for assigning datapoints into strati.
        Specified by:
        assignToStrati in interface IStratiAssigner
        Parameters:
        datapoint - The datapoint that has to be assigned.
        Returns:
        The index of the strati the datapoint will be assigned into.
      • setNumCPUs

        public void setNumCPUs​(int numberOfCPUs)
        Specified by:
        setNumCPUs in interface org.api4.java.common.control.IParallelizable
      • getNumCPUs

        public int getNumCPUs()
        Specified by:
        getNumCPUs in interface org.api4.java.common.control.IParallelizable
      • getClusters

        public java.util.List<org.apache.commons.math3.ml.clustering.CentroidCluster<org.apache.commons.math3.ml.clustering.Clusterable>> getClusters()
      • setClusters

        protected void setClusters​(java.util.List<org.apache.commons.math3.ml.clustering.CentroidCluster<org.apache.commons.math3.ml.clustering.Clusterable>> clusters)