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

Class for evaluating the fitness of individuals in a population. More...

#include <evaluation.h>

Collaboration diagram for Brush::Eval::Evaluation< T >:

Public Member Functions

 Evaluation ()
 Constructor for Evaluation class.
 
 ~Evaluation ()
 
void set_scorer (string scorer)
 Set the scorer for evaluation.
 
string get_scorer ()
 Get the current scorer.
 
void update_fitness (Population< T > &pop, int island, const Dataset &data, const Parameters &params, bool fit=true, bool validation=false)
 Update the fitness of individuals in a population.
 
void assign_fit (Individual< T > &ind, const Dataset &data, const Parameters &params, bool val=false)
 Assign fitness to an individual.
 

Public Attributes

Scorer< T > S
 

Detailed Description

template<ProgramType T>
class Brush::Eval::Evaluation< T >

Class for evaluating the fitness of individuals in a population.

Definition at line 26 of file evaluation.h.

Constructor & Destructor Documentation

◆ Evaluation()

template<ProgramType T>
Brush::Eval::Evaluation< T >::Evaluation ( )
inline

Constructor for Evaluation class.

Initializes the scorer based on the program type.

Definition at line 33 of file evaluation.h.

Here is the call graph for this function:

◆ ~Evaluation()

template<ProgramType T>
Brush::Eval::Evaluation< T >::~Evaluation ( )
inline

Definition at line 47 of file evaluation.h.

Member Function Documentation

◆ assign_fit()

template<ProgramType T>
void Brush::Eval::Evaluation< T >::assign_fit ( Individual< T > & ind,
const Dataset & data,
const Parameters & params,
bool val = false )

Assign fitness to an individual.

Parameters
indThe individual to assign fitness to.
dataThe dataset for evaluation.
paramsThe parameters for evaluation.
valFlag indicating whether it is validation fitness.

Definition at line 46 of file evaluation.cpp.

Here is the call graph for this function:

◆ get_scorer()

template<ProgramType T>
string Brush::Eval::Evaluation< T >::get_scorer ( )
inline

Get the current scorer.

Returns
The current scorer.

Definition at line 59 of file evaluation.h.

Here is the call graph for this function:

◆ set_scorer()

template<ProgramType T>
void Brush::Eval::Evaluation< T >::set_scorer ( string scorer)
inline

Set the scorer for evaluation.

Parameters
scorerThe scorer to be set.

Definition at line 53 of file evaluation.h.

Here is the call graph for this function:

◆ update_fitness()

template<ProgramType T>
void Brush::Eval::Evaluation< T >::update_fitness ( Population< T > & pop,
int island,
const Dataset & data,
const Parameters & params,
bool fit = true,
bool validation = false )

Update the fitness of individuals in a population.

Parameters
popThe population to update.
islandThe island index.
dataThe dataset for evaluation.
paramsThe parameters for evaluation.
fitFlag indicating whether to update fitness.
validationFlag indicating whether to perform validation.

Definition at line 9 of file evaluation.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ S

template<ProgramType T>
Scorer<T> Brush::Eval::Evaluation< T >::S

Definition at line 28 of file evaluation.h.


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