|
| | basic_search (problem &, metric_flags=metric_flags::accuracy) |
| auto | predictor (const individual_t &) const |
| bool | is_valid () const override |
| | basic_search (problem &, E) |
| search_stats< individual_t, fitness_t > | run (unsigned=1, const model_measurements< fitness_t > &={}) |
| basic_search & | after_generation (after_generation_callback_t) |
| basic_search & | logger (search_log &) noexcept |
|
basic_search & | refinement (refinement_callback_t) |
| basic_search & | on_training_new_best (on_training_new_best_callback_t) |
|
basic_search & | messages (bool) noexcept |
| basic_search & | tag (const std::string &) |
| basic_search & | stop_source (std::stop_source) |
|
template<ValidationStrategy, class... Args> |
| basic_search & | validation_strategy (Args &&...) |
| basic_search & | validation_strategy (const ultra::validation_strategy &) |
| template<ValidationStrategy V, class... Args> |
| basic_search< ES, E > & | validation_strategy (Args &&...args) |
| template<ValidationStrategy V, class... Args> |
| basic_search< ES, E > & | validation_strategy (Args &&...args) |
| template<template< class > class ES, Evaluator E> |
| basic_search< ES, E > & | validation_strategy (const ultra::validation_strategy &vs) |
template<template< class > class ES, Evaluator E>
class ultra::src::basic_search< ES, E >
Drives the search for solutions of symbolic regression / classification tasks.
template<template< class > class ES, Evaluator E>
| auto basic_search::predictor |
( |
const individual_t & | ind | ) |
const |
|
nodiscard |
Creates a predictor associated with a given individual.
- Parameters
-
| [in] | ind | individual used as building block for the predictor |
- Returns
- the evaluator-specific predictor, or no_predictor if the active evaluator does not provide one
The returned object depends on the evaluator used during training:
- if the evaluator exposes a predictor() method, its result is forwarded;
- otherwise, a no_predictor sentinel is returned.
This function is always well-formed: lack of predictor support is handled at compile time via the no_predictor fallback rather than via runtime errors.
template<template< class > class ES, Evaluator E>
Tries to tune search parameters for the current problem.
Parameter tuning is a typical approach to algorithm design. Such tuning is done by experimenting with different values and selecting the ones that give the best results on the test problems at hand.
However, the number of possible parameters and their different values means that this is a very complex and time-consuming task; it is something we do not want users to worry about (power users can force many parameters, but our idea is "simple by default").
So if user sets an environment parameter he will force the search class to use it as is. Otherwise this function will try to guess a good starting point and changes its hint after every run. The code is a mix of black magic, experience, common logic and randomness but it seems reasonable.
- Note
- It has been formally proven, in the No-Free-Lunch theorem, that it is impossible to tune a search algorithm such that it will have optimal settings for all possible problems, but parameters can be properly set for a given problem.
- See also
-
Reimplemented from ultra::basic_search< ES, E >.