|
pulsatrix
|
Decodes a real-valued genotype (a unit-hypercube point, one gene per parameter, each in [0, 1]) into a full hyperparameter Configuration – the encoding this campaign's GA operators (crossover.hpp/mutation.hpp, all defined over std::vector<double>) evolve directly, decoded only when a genotype needs to be evaluated. More...
#include <algorithm>#include <cmath>#include <stdexcept>#include <vector>#include "pulsatrix/search_space.hpp"
Go to the source code of this file.
Namespaces | |
| namespace | pulsatrix |
Functions | |
| Configuration | pulsatrix::DecodeGenotype (const SearchSpace &space, const std::vector< double > &genotype) |
| Decodes a unit-hypercube genotype into a Configuration using space's own declared bounds: Continuous linearly, LogUniform geometrically (both identical to gp_bo.hpp's UnitCubeToConfiguration); Integer by linear interpolation then rounding to the nearest integer (std::round – ties away from zero, portable); Categorical by linear interpolation into an index, floored, clamped to the last category (handles the gene == 1.0 boundary, which would otherwise floor to one-past-the-end). | |
Decodes a real-valued genotype (a unit-hypercube point, one gene per parameter, each in [0, 1]) into a full hyperparameter Configuration – the encoding this campaign's GA operators (crossover.hpp/mutation.hpp, all defined over std::vector<double>) evolve directly, decoded only when a genotype needs to be evaluated.