Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
Brush::Eval::Scorer< P > Class Template Reference

#include <scorer.h>

Collaboration diagram for Brush::Eval::Scorer< P >:

Public Member Functions

 Scorer (string scorer="log")
 
void set_scorer (string scorer)
 
string get_scorer ()
 
float score (const VectorXf &y_true, const VectorXf &y_pred, VectorXf &loss, const vector< float > &w)
 
float score (Individual< P > &ind, Dataset &data, VectorXf &loss, const Parameters &params)
 
 Scorer (string scorer="multi_log")
 
void set_scorer (string scorer)
 
string get_scorer ()
 
float score (const VectorXf &y_true, const ArrayXXf &y_pred, VectorXf &loss, const vector< float > &w)
 
float score (Individual< P > &ind, Dataset &data, VectorXf &loss, const Parameters &params)
 

Public Attributes

std::map< string, funcPointerscore_hash
 
string scorer
 

Private Types

using RetType = ArrayXf
 
typedef float(* funcPointer) (const VectorXf &, const VectorXf &, VectorXf &, const vector< float > &)
 
using RetType = ArrayXXf
 
typedef float(* funcPointer) (const VectorXf &, const ArrayXXf &, VectorXf &, const vector< float > &)
 

Detailed Description

template<ProgramType P>
requires ( P == PT::BinaryClassifier)
class Brush::Eval::Scorer< P >

Definition at line 75 of file scorer.h.

Member Typedef Documentation

◆ funcPointer [1/2]

template<ProgramType P>
typedef float(* Brush::Eval::Scorer< P >::funcPointer) (const VectorXf &, const ArrayXXf &, VectorXf &, const vector< float > &)
private

Definition at line 132 of file scorer.h.

◆ funcPointer [2/2]

template<ProgramType P>
typedef float(* Brush::Eval::Scorer< P >::funcPointer) (const VectorXf &, const VectorXf &, VectorXf &, const vector< float > &)
private

Definition at line 80 of file scorer.h.

◆ RetType [1/2]

template<ProgramType P>
using Brush::Eval::Scorer< P >::RetType = ArrayXf
private

Definition at line 78 of file scorer.h.

◆ RetType [2/2]

template<ProgramType P>
using Brush::Eval::Scorer< P >::RetType = ArrayXXf
private

Definition at line 130 of file scorer.h.

Constructor & Destructor Documentation

◆ Scorer() [1/2]

template<ProgramType P>
Brush::Eval::Scorer< P >::Scorer ( string scorer = "log")
inline

Definition at line 89 of file scorer.h.

Here is the call graph for this function:

◆ Scorer() [2/2]

template<ProgramType P>
Brush::Eval::Scorer< P >::Scorer ( string scorer = "multi_log")
inline

Definition at line 141 of file scorer.h.

Here is the call graph for this function:

Member Function Documentation

◆ get_scorer() [1/2]

template<ProgramType P>
string Brush::Eval::Scorer< P >::get_scorer ( )
inline

Definition at line 97 of file scorer.h.

◆ get_scorer() [2/2]

template<ProgramType P>
string Brush::Eval::Scorer< P >::get_scorer ( )
inline

Definition at line 148 of file scorer.h.

◆ score() [1/4]

template<ProgramType P>
float Brush::Eval::Scorer< P >::score ( const VectorXf & y_true,
const ArrayXXf & y_pred,
VectorXf & loss,
const vector< float > & w )
inline

Definition at line 151 of file scorer.h.

Here is the call graph for this function:

◆ score() [2/4]

template<ProgramType P>
float Brush::Eval::Scorer< P >::score ( const VectorXf & y_true,
const VectorXf & y_pred,
VectorXf & loss,
const vector< float > & w )
inline

Definition at line 100 of file scorer.h.

Here is the call graph for this function:

◆ score() [3/4]

template<ProgramType P>
float Brush::Eval::Scorer< P >::score ( Individual< P > & ind,
Dataset & data,
VectorXf & loss,
const Parameters & params )
inline

Definition at line 117 of file scorer.h.

Here is the call graph for this function:

◆ score() [4/4]

template<ProgramType P>
float Brush::Eval::Scorer< P >::score ( Individual< P > & ind,
Dataset & data,
VectorXf & loss,
const Parameters & params )
inline

Definition at line 172 of file scorer.h.

Here is the call graph for this function:

◆ set_scorer() [1/2]

template<ProgramType P>
void Brush::Eval::Scorer< P >::set_scorer ( string scorer)
inline

Definition at line 96 of file scorer.h.

◆ set_scorer() [2/2]

template<ProgramType P>
void Brush::Eval::Scorer< P >::set_scorer ( string scorer)
inline

Definition at line 147 of file scorer.h.

Member Data Documentation

◆ score_hash

template<ProgramType P>
std::map< string, funcPointer > Brush::Eval::Scorer< P >::score_hash

Definition at line 86 of file scorer.h.

◆ scorer

template<ProgramType P>
string Brush::Eval::Scorer< P >::scorer

Definition at line 87 of file scorer.h.


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