10template<ProgramType T>
13 this->name =
"lexicase";
14 this->survival = surv;
17template<ProgramType T>
42 || params.
scorer_.compare(
"multi_log")==0)
67 for (
unsigned int i = 0;
i<
P; ++
i)
79 for (
unsigned i = 0;
i<
N; ++
i)
86 sample_weights.begin(), sample_weights.end());
91 sample_weights.erase(sample_weights.begin() +
idx);
113 float minfit = std::numeric_limits<float>::max();
116 for (
size_t j = 0;
j<
pool.size(); ++
j)
124 for (
size_t j = 0;
j<
pool.size(); ++
j)
165template<ProgramType T>
171 return vector<size_t>();
void bind_engine(py::module &m, string name)
vector< size_t > get_island_indexes(int island)
vector< std::shared_ptr< Individual< T > > > individuals
Lexicase(bool surv=false)
vector< size_t > survive(Population< T > &pop, int island, const Parameters &p)
lexicase survival
vector< size_t > select(Population< T > &pop, int island, const Parameters &p)
function returns a set of selected indices from pop
void shuffle(RandomAccessIterator first, RandomAccessIterator last)
Iter select_randomly(Iter start, Iter end)
#define HANDLE_ERROR_THROW(err)
float mad(const ArrayXf &x)
median absolute deviation
< nsga2 selection operator for getting the front
vector< float > sample_weights
weights for each sample
string scorer_
actual loss function used, determined by error
vector< float > class_weights
weights for each class