Class BinaryTreeNumericAttributeClassObserverRegression

    • Constructor Detail

      • BinaryTreeNumericAttributeClassObserverRegression

        public BinaryTreeNumericAttributeClassObserverRegression()
    • Method Detail

      • observeAttributeClass

        public void observeAttributeClass​(double attVal,
                                          int classVal,
                                          double weight)
        Description copied from interface: AttributeClassObserver
        Updates statistics of this observer given an attribute value, a class and the weight of the instance observed
        Specified by:
        observeAttributeClass in interface AttributeClassObserver
        Parameters:
        attVal - the value of the attribute
        classVal - the class
        weight - the weight of the instance
      • probabilityOfAttributeValueGivenClass

        public double probabilityOfAttributeValueGivenClass​(double attVal,
                                                            int classVal)
        Description copied from interface: AttributeClassObserver
        Gets the probability for an attribute value given a class
        Specified by:
        probabilityOfAttributeValueGivenClass in interface AttributeClassObserver
        Parameters:
        attVal - the attribute value
        classVal - the class
        Returns:
        probability for an attribute value given a class
      • getBestEvaluatedSplitSuggestion

        public AttributeSplitSuggestion getBestEvaluatedSplitSuggestion​(SplitCriterion criterion,
                                                                        double[] preSplitDist,
                                                                        int attIndex,
                                                                        boolean binaryOnly)
        Description copied from interface: AttributeClassObserver
        Gets the best split suggestion given a criterion and a class distribution
        Specified by:
        getBestEvaluatedSplitSuggestion in interface AttributeClassObserver
        Parameters:
        criterion - the split criterion to use
        preSplitDist - the class distribution before the split
        attIndex - the attribute index
        binaryOnly - true to use binary splits
        Returns:
        suggestion of best attribute split
      • getDescription

        public void getDescription​(StringBuilder sb,
                                   int indent)
        Description copied from interface: MOAObject
        Returns a string representation of this object. Used in AbstractMOAObject.toString to give a string representation of the object.
        Specified by:
        getDescription in interface MOAObject
        Parameters:
        sb - the stringbuilder to add the description
        indent - the number of characters to indent
      • prepareForUseImpl

        protected void prepareForUseImpl​(TaskMonitor monitor,
                                         ObjectRepository repository)
        Description copied from class: AbstractOptionHandler
        This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implement prepareForUseImpl and not prepareForUse since prepareForUse calls prepareForUseImpl.
        Specified by:
        prepareForUseImpl in class AbstractOptionHandler
        Parameters:
        monitor - the TaskMonitor to use
        repository - the ObjectRepository to use