Documentation of 'jsat.classifiers.evaluation.BalancedAccuracy' Java class
BalancedAccuracy
jsat.classifiers.evaluation

Class BalancedAccuracy

  • All Implemented Interfaces:
    java.io.Serializable, ClassificationScore


    public class BalancedAccuracy
    extends java.lang.Object
    implements ClassificationScore
    This class implements the Balanced Accuracy metric. If the number of test points has an equal total weight for each class, then Balanced Accuracy returns the same result as Accuracy. If not, this class will re-scale the importance of errors in each class and return an accuracy score as if each class had equal total weight. That is to say, it evaluates the data as if it was balanced.

    See: Brodersen, K. H., Ong, C. S., Stephan, K. E., & Buhmann, J. M. (2010). The Balanced Accuracy and Its Posterior Distribution. In Proceedings of the 2010 20th International Conference on Pattern Recognition (pp. 3121–3124). Washington, DC, USA: IEEE Computer Society. http://doi.org/10.1109/ICPR.2010.764
    See Also:
    Serialized Form
    • Constructor Detail

      • BalancedAccuracy

        public BalancedAccuracy()
    • Method Detail

      • lowerIsBetter

        public boolean lowerIsBetter()
        Description copied from interface: ClassificationScore
        Returns true if a lower score is better, or false if a higher score is better
        Specified by:
        lowerIsBetter in interface ClassificationScore
        Returns:
        true if a lower score is better
      • getName

        public java.lang.String getName()
        Description copied from interface: ClassificationScore
        Returns the name to present for this score
        Specified by:
        getName in interface ClassificationScore
        Returns:
        the score name
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface ClassificationScore
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals(java.lang.Object obj)
        Specified by:
        equals in interface ClassificationScore
        Overrides:
        equals in class java.lang.Object
      • addResult

        public void addResult(CategoricalResults prediction,
                              int trueLabel,
                              double weight)
        Description copied from interface: ClassificationScore
        Adds the given result to the score
        Specified by:
        addResult in interface ClassificationScore
        Parameters:
        prediction - the prediction for the data point
        trueLabel - the true label for the data point
        weight - the weigh to assign to the data point
      • addResults

        public void addResults(ClassificationScore other)
        Description copied from interface: ClassificationScore
        The score contained in this object is augmented with the results already accumulated in the other object. This does not result in an averaging, but alters the current object to have the same score it would have had if all the results were originally inserted into this object.

        This method is only required to work if other if of the same class as this object.
        Specified by:
        addResults in interface ClassificationScore
        Parameters:
        other - the object to add the results from

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.