slope 6.6.0
Loading...
Searching...
No Matches
slope::MinimizeScore Class Reference

Scoring metric that aims to minimize the score value. More...

#include <score.h>

Inheritance diagram for slope::MinimizeScore:
Collaboration diagram for slope::MinimizeScore:

Public Member Functions

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
virtual double eval (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, const std::unique_ptr< Loss > &loss) const =0
virtual double eval (const Eigen::MatrixXd &eta, const Eigen::MatrixXd &y, const std::unique_ptr< Loss > &loss, const Eigen::VectorXd &observation_weights) const

Additional Inherited Members

Static Public Member Functions inherited from slope::Score
static std::unique_ptr< Score > create (const std::string &metric)

Detailed Description

Scoring metric that aims to minimize the score value.

This class implements a scoring metric where lower values indicate better performance (e.g., MSE, MAE, deviance). It overrides the base Score class comparison methods to establish that higher values are worse.

Definition at line 127 of file score.h.

Member Function Documentation

◆ initValue()

double slope::MinimizeScore::initValue ( ) const
overridevirtual

Returns the initial value for minimization metrics.

Returns
Positive infinity as the worst possible score

Implements slope::Score.

◆ isWorse()

bool slope::MinimizeScore::isWorse ( double a,
double b ) const
overridevirtual

Determines if score a is worse than score b.

Parameters
aFirst score to compare
bSecond score to compare
Returns
true if a > b (higher values are worse)

Implements slope::Score.


The documentation for this class was generated from the following file: