Class AbstractAMRules

    • Field Detail

      • ruleSet

        protected RuleSet ruleSet
      • defaultRule

        protected Rule defaultRule
      • ruleNumberID

        protected int ruleNumberID
      • statistics

        protected double[] statistics
      • NORMAL_CONSTANT

        public static final double NORMAL_CONSTANT
      • splitConfidenceOption

        public FloatOption splitConfidenceOption
      • tieThresholdOption

        public FloatOption tieThresholdOption
      • gracePeriodOption

        public IntOption gracePeriodOption
      • DriftDetectionOption

        public FlagOption DriftDetectionOption
      • pageHinckleyAlphaOption

        public FloatOption pageHinckleyAlphaOption
      • pageHinckleyThresholdOption

        public IntOption pageHinckleyThresholdOption
      • noAnomalyDetectionOption

        public FlagOption noAnomalyDetectionOption
      • multivariateAnomalyProbabilityThresholdOption

        public FloatOption multivariateAnomalyProbabilityThresholdOption
      • univariateAnomalyprobabilityThresholdOption

        public FloatOption univariateAnomalyprobabilityThresholdOption
      • anomalyNumInstThresholdOption

        public IntOption anomalyNumInstThresholdOption
      • unorderedRulesOption

        public FlagOption unorderedRulesOption
      • VerbosityOption

        public IntOption VerbosityOption
      • numericObserverOption

        public ClassOption numericObserverOption
      • attributesPercentage

        protected double attributesPercentage
    • Constructor Detail

      • AbstractAMRules

        public AbstractAMRules()
      • AbstractAMRules

        public AbstractAMRules​(double attributesPercentage)
    • Method Detail

      • getAttributesPercentage

        public double getAttributesPercentage()
      • setAttributesPercentage

        public void setAttributesPercentage​(double attributesPercentage)
      • isRandomizable

        public abstract boolean isRandomizable()
        description of the Methods used. isRandomizable resetLearningImpl newRule // to build an object with the parameters. trainOnInstanceImpl isAnomaly getVotesForInstance getModelMeasurementsImpl getModelDescription // to printout to MOA GUI debug // use debug('string') to printout to console
        Returns:
        true if the learner needs a random seed.
      • newRule

        protected abstract Rule newRule​(int ID,
                                        RuleActiveLearningNode learningNode,
                                        double[] statistics)
        Rule.Builder() to build an object with the parameters. If you have an algorithm with many parameters, especially if some of them are optional, it can be beneficial to define an object that represents all of the parameters.
        Returns:
      • trainOnInstanceImpl

        public void trainOnInstanceImpl​(Instance instance)
        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.
        Specified by:
        trainOnInstanceImpl in class AbstractClassifier
        Parameters:
        instance - the instance to be used for training
      • getVotesForInstance

        public double[] getVotesForInstance​(Instance instance)
        getVotesForInstance extension of the instance method getVotesForInstance in moa.classifier.java returns the prediction of the instance. Called in EvaluateModelRegression
        Specified by:
        getVotesForInstance in interface Classifier
        Specified by:
        getVotesForInstance in class AbstractClassifier
        Parameters:
        instance - the instance to be classified
        Returns:
        an array containing the estimated membership probabilities of the test instance in each class
      • getModelDescription

        public void getModelDescription​(StringBuilder out,
                                        int indent)
        print GUI learn model
        Specified by:
        getModelDescription in class AbstractClassifier
        Parameters:
        out - the stringbuilder to add the description
        indent - the number of characters to indent
      • debug

        protected void debug​(String string,
                             int level)
        Print to console
        Parameters:
        string -
      • VerboseToConsole

        protected void VerboseToConsole​(Instance inst)
      • PrintRuleSet

        public void PrintRuleSet()
      • newRuleActiveLearningNode

        public abstract RuleActiveLearningNode newRuleActiveLearningNode​(double[] initialClassObservations)
      • getModelAttIndexToInstanceAttIndex

        public int getModelAttIndexToInstanceAttIndex​(int index,
                                                      Instance inst)
      • 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.
        Specified by:
        resetLearningImpl in class AbstractClassifier
      • modelAttIndexToInstanceAttIndex

        public static int modelAttIndexToInstanceAttIndex​(int index,
                                                          Instance inst)
        Gets the index of the attribute in the instance, given the index of the attribute in the learner.
        Parameters:
        index - the index of the attribute in the learner
        inst - the instance
        Returns:
        the index in the instance
      • getVotes

        public Vote getVotes​(Instance instance)
        getVotes extension of the instance method getVotesForInstance in moa.classifier.java returns the prediction of the instance. Called in WeightedRandomRules