![]()  | 
  
    slope 6.0.1
    
   | 
 
Classification Accuracy scoring metric. More...
#include <score.h>


Public Member Functions | |
| double | eval (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, const std::unique_ptr< Loss > &loss) const override | 
  Public Member Functions inherited from slope::MaximizeScore | |
| bool | isWorse (double a, double b) const override | 
| double | initValue () const override | 
  Public Member Functions inherited from slope::Score | |
| std::function< bool(double, double)> | getComparator () const | 
Additional Inherited Members | |
  Static Public Member Functions inherited from slope::Score | |
| static std::unique_ptr< Score > | create (const std::string &metric) | 
Classification Accuracy scoring metric.
Computes the proportion of correct predictions in classification problems. Inherits from MaximizeScore since higher accuracy values indicate better performance.
Accuracy = (number of correct predictions) / (total number of predictions)
For binary classification, predictions are thresholded at 0.5. For multi-class problems, the class with highest probability is selected as the prediction for each sample.
      
  | 
  overridevirtual | 
Evaluates the classification accuracy between predictions and true labels.
| eta | Matrix of model predictions/probabilities | 
| y | Matrix of true labels (one-hot encoded) | 
| loss | Loss function used to transform predictions if needed | 
Implements slope::Score.