ai.libs.jaicore.ml.core.dataset.sampling.inmemory

Class SystematicSampling<I extends IInstance>

  • All Implemented Interfaces:
    ai.libs.jaicore.basic.algorithm.IAlgorithm<IDataset<I>,IDataset<I>>, ai.libs.jaicore.basic.Cancelable, ai.libs.jaicore.basic.ILoggingCustomizable, java.lang.Iterable<ai.libs.jaicore.basic.algorithm.events.AlgorithmEvent>, java.util.concurrent.Callable<IDataset<I>>, java.util.Iterator<ai.libs.jaicore.basic.algorithm.events.AlgorithmEvent>


    public class SystematicSampling<I extends IInstance>extends ASamplingAlgorithm<I>
    Implementation of Systematic Sampling: Sort datapoints and pick every k-th datapoint for the sample.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SystematicSampling(java.util.Random random, java.util.Comparator<I> datapointComparator, IDataset<I> input)
      Constructor for a custom datapoint comparator.
      SystematicSampling(java.util.Random random, IDataset<I> input)
      Simple constructor that uses the default datapoint comparator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      IDataset<I>getSortedDataset() 
      ai.libs.jaicore.basic.algorithm.events.AlgorithmEventnextWithException() 
      voidsetSortedDataset(IDataset<I> sortedDataset) 
      • Methods inherited from class ai.libs.jaicore.basic.algorithm.AAlgorithm

        activate, announceTimeoutDetected, avoidReinterruptionOnShutdownOnCurrentThread, cancel, checkAndConductTermination, checkTermination, computeTimeoutAware, getActivationTime, getConfig, getId, getInput, getLoggerName, getNumCPUs, getRemainingTimeToDeadline, getState, getTimeout, getTimeoutPrecautionOffset, hasNext, hasThreadBeenInterruptedDuringShutdown, interruptThreadAsPartOfShutdown, isCanceled, isShutdownInitialized, isStopCriterionSatisfied, isTimeouted, iterator, next, post, registerActiveThread, registerListener, resolveShutdownInterruptOnCurrentThread, setConfig, setLoggerName, setMaxNumThreads, setNumCPUs, setState, setTimeout, setTimeout, setTimeoutPrecautionOffset, shutdown, terminate, unregisterActiveThread, unregisterThreadAndShutdown
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Constructor Detail

      • SystematicSampling

        public SystematicSampling(java.util.Random random,                          IDataset<I> input)
        Simple constructor that uses the default datapoint comparator.
        Parameters:
        random - Random Object for determining the sampling start point.
      • SystematicSampling

        public SystematicSampling(java.util.Random random,                          java.util.Comparator<I> datapointComparator,                          IDataset<I> input)
        Constructor for a custom datapoint comparator.
        Parameters:
        random - Random Object for determining the sampling start point.
        datapointComparator - Comparator to sort the dataset.
    • Method Detail

      • nextWithException

        public ai.libs.jaicore.basic.algorithm.events.AlgorithmEvent nextWithException()                                                                        throws ai.libs.jaicore.basic.algorithm.exceptions.AlgorithmException
        Throws:
        ai.libs.jaicore.basic.algorithm.exceptions.AlgorithmException
      • getSortedDataset

        public IDataset<I> getSortedDataset()
      • setSortedDataset

        public void setSortedDataset(IDataset<I> sortedDataset)


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14