Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
lexicase.h
Go to the documentation of this file.
1#ifndef LEXICASE_H
2#define LEXICASE_H
3
5#include "../util/utils.h"
6
7namespace Brush {
8namespace Sel {
9
10using namespace Brush;
11using namespace Pop;
12using namespace Sel;
13
14
20template<ProgramType T>
21class Lexicase : public SelectionOperator<T>
22{
23public:
24 Lexicase(bool surv=false);
26
28 vector<size_t> select(Population<T>& pop, int island,
29 const Parameters& p);
30
32 vector<size_t> survive(Population<T>& pop, int island,
33 const Parameters& p);
34};
35
36} // Sel
37} // Brush
38#endif
void bind_engine(py::module &m, string name)
Lexicase selection operator.
Definition lexicase.h:22
Lexicase(bool surv=false)
Definition lexicase.cpp:11
vector< size_t > survive(Population< T > &pop, int island, const Parameters &p)
lexicase survival
Definition lexicase.cpp:166
vector< size_t > select(Population< T > &pop, int island, const Parameters &p)
function returns a set of selected indices from pop
Definition lexicase.cpp:18
The SelectionOperator class represents a base class for selection operators in a genetic algorithm.
< nsga2 selection operator for getting the front
Definition data.cpp:12