|
Brush C++ API
A flexible interpretable machine learning framework
|
Class for evaluating the fitness of individuals in a population. More...
#include <evaluation.h>

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 ¶ms, bool fit=true, bool validation=true, bool force_fit=false, Dataset *validation_data=nullptr) |
| Update the fitness of individuals in a population. | |
| void | assign_fit (Individual< T > &ind, const Dataset &data, const Parameters ¶ms, bool val=false, Dataset *validation_data=nullptr) |
| Assign fitness to an individual. | |
Public Attributes | |
| Scorer< T > | S |
| size_t | n_evaluations = 0 |
| number of calls to assign_fit (each one scores an individual on the training partition and, if there is one, on the validation partition). | |
Class for evaluating the fitness of individuals in a population.
Definition at line 27 of file evaluation.h.
|
inline |
Constructor for Evaluation class.
Initializes the scorer based on the program type.
Definition at line 34 of file evaluation.h.


|
inline |
Definition at line 49 of file evaluation.h.
| void Brush::Eval::Evaluation< T >::assign_fit | ( | Individual< T > & | ind, |
| const Dataset & | data, | ||
| const Parameters & | params, | ||
| bool | val = false, | ||
| Dataset * | validation_data = nullptr ) |
Assign fitness to an individual.
| ind | The individual to assign fitness to. |
| data | The dataset for evaluation. |
| params | The parameters for evaluation. |
| val | Flag indicating whether it is validation fitness. |
Definition at line 57 of file evaluation.cpp.


|
inline |
Get the current scorer.
Definition at line 61 of file evaluation.h.

|
inline |
Set the scorer for evaluation.
| scorer | The scorer to be set. |
Definition at line 55 of file evaluation.h.

| void Brush::Eval::Evaluation< T >::update_fitness | ( | Population< T > & | pop, |
| int | island, | ||
| const Dataset & | data, | ||
| const Parameters & | params, | ||
| bool | fit = true, | ||
| bool | validation = true, | ||
| bool | force_fit = false, | ||
| Dataset * | validation_data = nullptr ) |
Update the fitness of individuals in a population.
| pop | The population to update. |
| island | The island index. |
| data | The dataset for evaluation. |
| params | The parameters for evaluation. |
| fit | Flag indicating whether to update fitness. |
| validation | Flag indicating whether to perform validation. |
Definition at line 9 of file evaluation.cpp.

| size_t Brush::Eval::Evaluation< T >::n_evaluations = 0 |
number of calls to assign_fit (each one scores an individual on the training partition and, if there is one, on the validation partition).
Definition at line 95 of file evaluation.h.
| Scorer<T> Brush::Eval::Evaluation< T >::S |
Definition at line 29 of file evaluation.h.