Class RCD

  • All Implemented Interfaces:
    Configurable, Serializable, CapabilitiesHandler, Classifier, MultiClassClassifier, AWTRenderable, Learner<Example<Instance>>, MOAObject, OptionHandler

    public class RCD
    extends SingleClassifierDrift
    Creates a set of classifiers, each one representing a different context. Reuses classifier associating to each one a sample of data and compares new data to old ones using a multivariate non-parametric statistical test. Tests are performed in parallel and classifiers are stored based on their accuracy and stored time. 1) Parameterized number of classifiers to store. 2) Classifiers are stored removing the older ones if the set is full. 3) Classifier with higher significance value is selected. Based on: Gonçalves Jr, Paulo Mauricio, and Roberto Souto Maior De Barros. "RCD: A recurring concept drift framework." Pattern Recognition Letters 34.9 (2013): 1018-1025.
    Author:
    Paulo Goncalves (paulogoncalves at recife dot ifpe dot edu dot br)
    See Also:
    Serialized Form
    • Field Detail

      • statisticalTestOption

        public ClassOption statisticalTestOption
      • similarityBetweenDistributionsOption

        public FloatOption similarityBetweenDistributionsOption
      • bufferSizeOption

        public IntOption bufferSizeOption
      • testFrequencyOption

        public IntOption testFrequencyOption
      • classifiersSizeOption

        public IntOption classifiersSizeOption
      • threadSizeOption

        public IntOption threadSizeOption
      • quantityClassifiersTestOption

        public IntOption quantityClassifiersTestOption
      • bufferSize

        protected int bufferSize
      • previousState

        protected int previousState
      • index

        protected int index
    • Constructor Detail

      • RCD

        public RCD()
    • Method Detail

      • resetLearningImpl

        public void resetLearningImpl()
        Description copied from class: AbstractClassifier
        Resets this classifier. It must be similar to starting a new classifier from scratch.

        The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
        Overrides:
        resetLearningImpl in class DriftDetectionMethodClassifier
      • trainOnInstanceImpl

        public void trainOnInstanceImpl​(Instance inst)
        Description copied from class: AbstractClassifier
        Trains this classifier incrementally using the given instance.

        The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.
        Overrides:
        trainOnInstanceImpl in class DriftDetectionMethodClassifier
        Parameters:
        inst - the instance to be used for training
      • getVotesForInstance

        public double[] getVotesForInstance​(Instance inst)
        Description copied from interface: Classifier
        Predicts the class memberships for a given instance. If an instance is unclassified, the returned array elements must be all zero.
        Specified by:
        getVotesForInstance in interface Classifier
        Overrides:
        getVotesForInstance in class DriftDetectionMethodClassifier
        Parameters:
        inst - the instance to be classified
        Returns:
        an array containing the estimated membership probabilities of the test instance in each class