13#if !defined(VITA_LAMBDA_F_H)
14#define VITA_LAMBDA_F_H
23#include "utility/discretization.h"
25#include "kernel/gp/detail/lambda_f.h"
55 virtual bool is_valid()
const = 0;
65template<
class T = i_mep> std::unique_ptr<basic_src_lambda_f> load(
70bool save(std::ostream &,
const basic_src_lambda_f *);
71bool save(std::ostream &,
const basic_src_lambda_f &);
72bool save(std::ostream &,
const std::unique_ptr<basic_src_lambda_f> &);
97 virtual std::string name(
const value_t &)
const = 0;
102 virtual std::string serialize_id()
const = 0;
103 virtual bool save(std::ostream &)
const = 0;
105 template<
class T>
friend std::unique_ptr<basic_src_lambda_f>
106 serialize::lambda::load(std::istream &,
const symbol_set &);
128template<
class T,
bool S>
130 protected detail::reg_lambda_f_storage<T, S>
138 std::string name(
const value_t &)
const final;
142 bool is_valid()
const final;
145 static const std::string SERIALIZE_ID;
146 bool save(std::ostream &)
const final;
152 std::string serialize_id()
const final {
return SERIALIZE_ID; }
196 protected detail::class_names<N>
203 std::string name(
const value_t &)
const final;
223template<
class T,
bool S,
bool N>
232 bool is_valid()
const final;
234 double training_accuracy()
const;
237 static const std::string SERIALIZE_ID;
238 bool save(std::ostream &)
const final;
245 std::string serialize_id()
const final {
return SERIALIZE_ID; }
254 matrix<unsigned> slot_matrix_;
257 std::vector<class_t> slot_class_;
260 std::size_t dataset_size_;
275template<
class T,
bool S,
bool N>
284 bool is_valid()
const final;
287 static const std::string SERIALIZE_ID;
288 bool save(std::ostream &)
const final;
293 bool load_(std::istream &,
const symbol_set &, std::true_type);
294 bool load_(std::istream &,
const symbol_set &, std::false_type);
296 std::string serialize_id()
const final {
return SERIALIZE_ID; }
303 std::vector<distribution<number>> gauss_dist_;
316template<
class T,
bool S,
bool N>
325 bool is_valid()
const final;
328 static const std::string SERIALIZE_ID;
329 bool save(std::ostream &)
const final;
332 std::string serialize_id()
const final {
return SERIALIZE_ID; }
350template<
class T,
bool S,
bool N,
template<
class,
bool,
bool>
class L,
361 bool is_valid()
const final;
363 static const std::string SERIALIZE_ID;
366 bool save(std::ostream &)
const final;
367 std::string serialize_id()
const final;
371 std::vector<L<T, S, false>> team_;
383template<
class T,
bool S,
bool N>
388 using basic_dyn_slot_lambda_f::team_class_lambda_f::team_class_lambda_f;
398template<
class T,
bool S,
bool N>
403 using basic_gaussian_lambda_f::team_class_lambda_f::team_class_lambda_f;
413template<
class T,
bool S,
bool N>
418 using basic_binary_lambda_f::team_class_lambda_f::team_class_lambda_f;
436#include "kernel/gp/src/lambda_f.tcc"
Lambda class for Binary Classification.
The basic interface of a classification lambda class.
Lambda class for Slotted Dynamic Class Boundary Determination.
Lambda class for the Gaussian Distribution Classification.
The basic interface of a lambda function.
Lambda function specialized for regression tasks.
Extends basic_lambda_f interface adding some useful methods for symbolic regression / classification ...
The model_metric class choose the appropriate method considering this type.
The model_metric class choose the appropriate method considering this type.
A 2-dimensional labeled data structure with columns of potentially different types.
There are a lot of metrics related to a model (a lambda_f) and we don't want fat classes.
A container for the symbols used by the GP engine.
An helper class for extending classification schemes to teams.
A collection of cooperating individuals used as a member of vita::population.
The main namespace for the project.
std::size_t class_t
The type used as class ID in classification tasks.
team_composition
For classification problems there are two major possibilities to combine the outputs of multiple pred...
std::variant< D_VOID, D_INT, D_DOUBLE, D_STRING > value_t
A variant containing the data types used by the interpreter for internal calculations / output value ...
Contains a class ID / confidence level pair.
Stores a single element (row) of the dataset.