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="mse")
 
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)
 

Public Attributes

std::map< string, funcPointerscore_hash
 
string scorer
 

Private Types

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

Detailed Description

template<ProgramType P>
class Brush::Eval::Scorer< P >

Definition at line 17 of file scorer.h.

Member Typedef Documentation

◆ funcPointer

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

Definition at line 25 of file scorer.h.

◆ RetType

template<ProgramType P>
using Brush::Eval::Scorer< P >::RetType
private
Initial value:
typename std::conditional_t<P == PT::Regressor, ArrayXf,
std::conditional_t<P == PT::Representer, ArrayXXf, ArrayXf
>>
void bind_engine(py::module &m, string name)

Definition at line 20 of file scorer.h.

Constructor & Destructor Documentation

◆ Scorer()

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

Definition at line 35 of file scorer.h.

Here is the call graph for this function:

Member Function Documentation

◆ get_scorer()

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

Definition at line 42 of file scorer.h.

Here is the caller graph for this function:

◆ score() [1/2]

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 45 of file scorer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ score() [2/2]

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

Definition at line 63 of file scorer.h.

Here is the call graph for this function:

◆ set_scorer()

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

Definition at line 41 of file scorer.h.

Here is the caller graph for this function:

Member Data Documentation

◆ score_hash

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

Definition at line 31 of file scorer.h.

◆ scorer

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

Definition at line 32 of file scorer.h.


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