Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
Brush Namespace Reference

< nsga2 selection operator for getting the front More...

Namespaces

namespace  Data
 namespace containing Data structures used in Brush
 
namespace  detail
 
namespace  Eval
 
namespace  Pop
 
namespace  Sel
 
namespace  Split
 
namespace  util
 
namespace  Util
 namespace containing various utility functions
 
namespace  Var
 

Classes

struct  all_same
 checks whether all the types match. More...
 
struct  DataEnumType
 
struct  DataEnumType< DT::ArrayB >
 
struct  DataEnumType< DT::ArrayBJet >
 
struct  DataEnumType< DT::ArrayF >
 
struct  DataEnumType< DT::ArrayFJet >
 
struct  DataEnumType< DT::ArrayI >
 
struct  DataEnumType< DT::ArrayIJet >
 
struct  DataEnumType< DT::MatrixB >
 
struct  DataEnumType< DT::MatrixBJet >
 
struct  DataEnumType< DT::MatrixF >
 
struct  DataEnumType< DT::MatrixFJet >
 
struct  DataEnumType< DT::MatrixI >
 
struct  DataEnumType< DT::MatrixIJet >
 
struct  DataEnumType< DT::TimeSeriesB >
 
struct  DataEnumType< DT::TimeSeriesF >
 
struct  DataEnumType< DT::TimeSeriesI >
 
struct  DataTypeEnum
 
struct  DataTypeEnum< ArrayXb >
 
struct  DataTypeEnum< ArrayXbJet >
 
struct  DataTypeEnum< ArrayXf >
 
struct  DataTypeEnum< ArrayXfJet >
 
struct  DataTypeEnum< ArrayXi >
 
struct  DataTypeEnum< ArrayXiJet >
 
struct  DataTypeEnum< ArrayXXb >
 
struct  DataTypeEnum< ArrayXXbJet >
 
struct  DataTypeEnum< ArrayXXf >
 
struct  DataTypeEnum< ArrayXXfJet >
 
struct  DataTypeEnum< ArrayXXi >
 
struct  DataTypeEnum< ArrayXXiJet >
 
struct  DataTypeEnum< Data::TimeSeriesb >
 
struct  DataTypeEnum< Data::TimeSeriesbJet >
 
struct  DataTypeEnum< Data::TimeSeriesf >
 
struct  DataTypeEnum< Data::TimeSeriesfJet >
 
struct  DataTypeEnum< Data::TimeSeriesi >
 
struct  DataTypeEnum< Data::TimeSeriesiJet >
 
struct  DispatchTable
 
class  Engine
 The Engine class represents the core engine of the brush library. More...
 
struct  Fitness
 Represents the fitness of an individual in the Brush namespace. More...
 
struct  Function
 
struct  Function< NodeType::Abs >
 
struct  Function< NodeType::Acos >
 
struct  Function< NodeType::Add >
 
struct  Function< NodeType::After >
 
struct  Function< NodeType::And >
 
struct  Function< NodeType::ArgMax >
 
struct  Function< NodeType::Asin >
 
struct  Function< NodeType::Atan >
 
struct  Function< NodeType::Before >
 
struct  Function< NodeType::Ceil >
 
struct  Function< NodeType::Cos >
 
struct  Function< NodeType::Cosh >
 
struct  Function< NodeType::Count >
 
struct  Function< NodeType::Div >
 
struct  Function< NodeType::During >
 
struct  Function< NodeType::Exp >
 
struct  Function< NodeType::Floor >
 
struct  Function< NodeType::Log >
 
struct  Function< NodeType::Log1p >
 
struct  Function< NodeType::Logabs >
 
struct  Function< NodeType::Logistic >
 
struct  Function< NodeType::Max >
 
struct  Function< NodeType::Mean >
 
struct  Function< NodeType::Median >
 
struct  Function< NodeType::Min >
 
struct  Function< NodeType::Mul >
 
struct  Function< NodeType::Not >
 
struct  Function< NodeType::OffsetSum >
 
struct  Function< NodeType::Or >
 
struct  Function< NodeType::Pow >
 
struct  Function< NodeType::Prod >
 
struct  Function< NodeType::Sin >
 
struct  Function< NodeType::Sinh >
 
struct  Function< NodeType::Softmax >
 
struct  Function< NodeType::SplitOn >
 
struct  Function< NodeType::Sqrt >
 
struct  Function< NodeType::Sqrtabs >
 
struct  Function< NodeType::Square >
 
struct  Function< NodeType::Sub >
 
struct  Function< NodeType::Sum >
 
struct  Function< NodeType::Tan >
 
struct  Function< NodeType::Tanh >
 
struct  is_eigen_array
 
struct  is_one_of
 checks whether any of the types match the first one. More...
 
struct  is_std_array
 
struct  is_std_array< std::array< V, n > >
 
struct  is_tuple
 
struct  is_tuple< std::tuple< T... > >
 
struct  Jetify
 
struct  Jetify< ArrayXb >
 
struct  Jetify< ArrayXf >
 
struct  Jetify< ArrayXi >
 
struct  Jetify< ArrayXXb >
 
struct  Jetify< ArrayXXf >
 
struct  Jetify< ArrayXXi >
 
struct  Jetify< Data::TimeSeriesb >
 
struct  Jetify< Data::TimeSeriesf >
 
struct  Jetify< Data::TimeSeriesi >
 
struct  NarySignature
 
struct  NarySignatures
 Makes a tuple of signatures with increasing arity up to MaxArgCount. More...
 
struct  Node
 class holding the data for a node in a tree. More...
 
struct  NodeTypes
 
struct  Operator
 Core computation of a node's function to data. More...
 
struct  Operator< NodeType::Constant, S, Fit >
 
struct  Operator< NodeType::MeanLabel, S, Fit >
 
struct  Operator< NodeType::Terminal, S, Fit >
 Terminal Overload. More...
 
struct  OptimizerSummary
 
struct  Parameters
 
struct  Program
 An individual program, a.k.a. model. More...
 
struct  ResidualEvaluator
 
struct  SearchSpace
 Holds a search space, consisting of operations and terminals and functions, and methods to sample that space to create programs. More...
 
struct  SigBase
 
struct  SigBase< R >
 specialization for terminals More...
 
struct  Signature
 
struct  Signature< R(Args...)>
 
struct  Signatures
 
struct  Signatures< N, enable_if_t< is_in_v< N, NodeType::Abs, NodeType::Acos, NodeType::Asin, NodeType::Atan, NodeType::Cos, NodeType::Cosh, NodeType::Sin, NodeType::Sinh, NodeType::Tan, NodeType::Tanh, NodeType::Ceil, NodeType::Floor, NodeType::Exp, NodeType::Log, NodeType::Logabs, NodeType::Log1p, NodeType::Sqrt, NodeType::Sqrtabs, NodeType::Square, NodeType::Logistic, NodeType::OffsetSum > > >
 
struct  Signatures< N, enable_if_t< is_in_v< N, NodeType::Add, NodeType::Sub, NodeType::Mul, NodeType::Div, NodeType::Pow > > >
 
struct  Signatures< N, enable_if_t< is_in_v< N, NodeType::And, NodeType::Or > > >
 
struct  Signatures< N, enable_if_t< is_in_v< N, NodeType::ArgMax > > >
 
struct  Signatures< N, enable_if_t< is_in_v< N, NodeType::Before, NodeType::After, NodeType::During > > >
 
struct  Signatures< N, enable_if_t< is_in_v< N, NodeType::Constant, NodeType::Terminal > > >
 
struct  Signatures< N, enable_if_t< is_in_v< N, NodeType::SplitBest, NodeType::CustomSplit > > >
 
struct  Signatures< N, enable_if_t< is_in_v< N, NodeType::Sum, NodeType::Prod, NodeType::Min, NodeType::Max, NodeType::Mean, NodeType::Median > > >
 
struct  Signatures< NodeType::Count >
 
struct  Signatures< NodeType::MeanLabel >
 
struct  Signatures< NodeType::Not >
 
struct  Signatures< NodeType::Softmax >
 
struct  Signatures< NodeType::SplitOn >
 
struct  TinyCostFunction
 
struct  uint32_vector_hasher
 
struct  UnJetify
 
struct  UnJetify< ArrayXbJet >
 
struct  UnJetify< ArrayXfJet >
 
struct  UnJetify< ArrayXiJet >
 
struct  UnJetify< ArrayXXbJet >
 
struct  UnJetify< ArrayXXfJet >
 
struct  UnJetify< ArrayXXiJet >
 
struct  UnJetify< Data::TimeSeriesbJet >
 
struct  UnJetify< Data::TimeSeriesfJet >
 
struct  UnJetify< Data::TimeSeriesiJet >
 
struct  WeightOptimizer
 
struct  WeightType
 Returns the weight type associated with the scalar type underlying T. More...
 

Concepts

concept  IsAnyOf
 

Typedefs

using NT = NodeType
 
using UnderlyingNodeType = std::underlying_type_t<NodeType>
 
using Scalar = float
 
typedef tree< Node >::pre_order_iterator Iter
 
typedef tree< Node >::post_order_iterator PostIter
 
using PT = ProgramType
 
template<typename T >
using Jetify_t = typename Jetify<T>::type
 
template<typename T >
using UnJetify_t = typename UnJetify<T>::type
 
template<typename R , typename Arg , size_t ArgCount>
using NarySignature_t = typename NarySignature<R,Arg,ArgCount>::type
 
template<typename R , typename Arg , size_t MaxArgCount>
using NarySignatures_t = typename NarySignatures<R,Arg,MaxArgCount>::type
 
typedef Eigen::Array< bool, Eigen::Dynamic, 1 > ArrayXb
 
typedef Eigen::Array< int, Eigen::Dynamic, 1 > ArrayXi
 
typedef Eigen::Array< bool, Eigen::Dynamic, Eigen::Dynamic > ArrayXXb
 
typedef Eigen::Array< int, Eigen::Dynamic, Eigen::Dynamic > ArrayXXi
 
typedef ceres::Jet< float, stridefJet
 
typedef ceres::Jet< int, strideiJet
 
typedef ceres::Jet< bool, stridebJet
 
typedef Eigen::Array< fJet, Eigen::Dynamic, 1 > ArrayXfJet
 
typedef Eigen::Array< iJet, Eigen::Dynamic, 1 > ArrayXiJet
 
typedef Eigen::Array< bJet, Eigen::Dynamic, 1 > ArrayXbJet
 
typedef Eigen::Array< fJet, Eigen::Dynamic, Eigen::Dynamic > ArrayXXfJet
 
typedef Eigen::Array< iJet, Eigen::Dynamic, Eigen::Dynamic > ArrayXXiJet
 
typedef Eigen::Array< bJet, Eigen::Dynamic, Eigen::Dynamic > ArrayXXbJet
 
template<typename T >
using WeightType_t = typename WeightType<T>::type
 
typedef Program< PT::RegressorRegressorProgram
 
typedef Program< PT::BinaryClassifierClassifierProgram
 
typedef Program< PT::MulticlassClassifierMulticlassClassifierProgram
 
typedef Program< PT::RepresenterRepresenterProgram
 
typedef Pop::Individual< PT::RegressorRegressorIndividual
 
typedef Pop::Individual< PT::BinaryClassifierClassifierIndividual
 
typedef Pop::Individual< PT::MulticlassClassifierMulticlassClassifierIndividual
 
typedef Pop::Individual< PT::RepresenterRepresenterIndividual
 
typedef Engine< PT::RegressorRegressorEngine
 
typedef Engine< PT::BinaryClassifierClassifierEngine
 
typedef Engine< PT::MulticlassClassifierMulticlassClassifierEngine
 
typedef Engine< PT::RepresenterRepresenterEngine
 
using DT = DataType
 
using TreeIter = tree<Node>::pre_order_iterator
 

Enumerations

enum class  NodeType : uint64_t {
  Abs = 1UL << 0UL , Acos = 1UL << 1UL , Asin = 1UL << 2UL , Atan = 1UL << 3UL ,
  Cos = 1UL << 4UL , Cosh = 1UL << 5UL , Sin = 1UL << 6UL , Sinh = 1UL << 7UL ,
  Tan = 1UL << 8UL , Tanh = 1UL << 9UL , Ceil = 1UL << 10UL , Floor = 1UL << 11UL ,
  Exp = 1UL << 12UL , Log = 1UL << 13UL , Logabs = 1UL << 14UL , Log1p = 1UL << 15UL ,
  Sqrt = 1UL << 16UL , Sqrtabs = 1UL << 17UL , Square = 1UL << 18UL , Logistic = 1UL << 19UL ,
  Before = 1UL << 20UL , After = 1UL << 21UL , During = 1UL << 22UL , Min = 1UL << 23UL ,
  Max = 1UL << 24UL , Mean = 1UL << 25UL , Median = 1UL << 26UL , Prod = 1UL << 27UL ,
  Sum = 1UL << 28UL , OffsetSum = 1UL << 29UL , Softmax = 1UL << 30UL , Add = 1UL << 31UL ,
  Sub = 1UL << 32UL , Mul = 1UL << 33UL , Div = 1UL << 34UL , Pow = 1UL << 35UL ,
  SplitBest = 1UL << 36UL , SplitOn = 1UL << 37UL , And = 1UL << 38UL , Or = 1UL << 39UL ,
  Not = 1UL << 40UL , MeanLabel = 1UL << 41UL , Constant = 1UL << 42UL , Terminal = 1UL << 43UL ,
  ArgMax = 1UL << 44UL , Count = 1UL << 45UL , CustomUnaryOp = 1UL << 46UL , CustomBinaryOp = 1UL << 47UL ,
  CustomSplit = 1UL << 48UL
}
 
enum class  ProgramType : uint32_t { Regressor , BinaryClassifier , MulticlassClassifier , Representer }
 
enum class  DataType : uint32_t {
  ArrayB , ArrayI , ArrayF , MatrixB ,
  MatrixI , MatrixF , TimeSeriesB , TimeSeriesI ,
  TimeSeriesF , ArrayBJet , ArrayIJet , ArrayFJet ,
  MatrixBJet , MatrixIJet , MatrixFJet , TimeSeriesBJet ,
  TimeSeriesIJet , TimeSeriesFJet
}
 data types. More...
 

Functions

ostream & operator<< (ostream &os, DataType n)
 
std::ostream & operator<< (std::ostream &output, const Brush::Data::TimeSeries< bool > &ts)
 
std::ostream & operator<< (std::ostream &output, const Brush::Data::TimeSeries< float > &ts)
 
std::ostream & operator<< (std::ostream &output, const Brush::Data::TimeSeries< int > &ts)
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE (Engine< PT::Regressor >, params, best_ind, archive)
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE (Engine< PT::BinaryClassifier >, params, best_ind, archive)
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE (Engine< PT::MulticlassClassifier >, params, best_ind, archive)
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE (Engine< PT::Representer >, params, best_ind, archive)
 
void to_json (json &j, const Fitness &f)
 
void from_json (const json &j, Fitness &f)
 
 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE (Parameters, verbosity, random_state, pop_size, max_gens, max_stall, max_time, scorer_, load_population, save_population, logfile, current_gen, num_islands, max_depth, n_jobs, max_size, objectives, sel, surv, cx_prob, mig_prob, classification, n_classes, validation_size, feature_names, batch_size, mutation_probs, functions)
 
template<typename R , NodeType NT, typename S , bool Fit, typename W >
R DispatchOp (const Data::Dataset &d, TreeNode &tn, const W **weights)
 
template<typename R , NodeType NT, typename S , bool Fit>
R DispatchOp (const Data::Dataset &d, TreeNode &tn)
 
ostream & operator<< (ostream &os, const NodeType &nt)
 
ostream & operator<< (ostream &os, const Node &n)
 
void to_json (json &j, const Node &p)
 
void init_node_with_default_signature (Node &node)
 
void from_json (const json &j, Node &p)
 
template<DataType... T>
auto Isnt (DataType dt) -> bool
 
template<DataType DT>
auto IsWeighable () noexcept -> bool
 
auto IsWeighable (DataType dt) noexcept -> bool
 
template<NodeType... T>
auto Is (NodeType nt) -> bool
 
template<NodeType... T>
auto Isnt (NodeType nt) -> bool
 
auto IsLeaf (NodeType nt) noexcept -> bool
 
auto IsCommutative (NodeType nt) noexcept -> bool
 
auto IsDifferentiable (NodeType nt) noexcept -> bool
 
auto IsWeighable (NodeType nt) noexcept -> bool
 
constexpr auto operator& (NodeType lhs, NodeType rhs) -> NodeType
 
constexpr auto operator| (NodeType lhs, NodeType rhs) -> NodeType
 
constexpr auto operator^ (NodeType lhs, NodeType rhs) -> NodeType
 
constexpr auto operator~ (NodeType lhs) -> NodeType
 
auto operator&= (NodeType &lhs, NodeType rhs) -> NodeType &
 
auto operator|= (NodeType &lhs, NodeType rhs) -> NodeType &
 
auto operator^= (NodeType &lhs, NodeType rhs) -> NodeType &
 
template<ProgramType PType>
void to_json (json &j, const Program< PType > &p)
 
template<ProgramType PType>
void from_json (const json &j, Program< PType > &p)
 
float calc_initial_weight (const ArrayXf &value, const ArrayXf &y)
 
vector< Nodegenerate_terminals (const Dataset &d, const bool weights_init)
 generate terminals from the dataset features and random constants.
 
template<typename T >
RandomDequeue (std::vector< T > &Q)
 queue for make program
 

Variables

map< DataType, string > DataTypeName
 
map< string, DataTypeDataNameType = Util::reverse_map(DataTypeName)
 
const map< DataType, std::type_index > DataTypeID
 
map< std::type_index, DataTypeDataIDType = Util::reverse_map(DataTypeID)
 
template<class >
constexpr bool always_false_v = false
 
DispatchTable< truedtable_fit
 
DispatchTable< falsedtable_predict
 
template<typename T >
constexpr auto Stack
 Stacks Eigen arrays into a 2d-array, where each array is a column.
 
std::map< std::string, NodeTypeNodeNameType
 
std::map< NodeType, std::string > NodeTypeName = Util::reverse_map(NodeNameType)
 
static constexpr size_t MAX_ARGS = 5
 
template<typename First , typename ... Next>
static constexpr bool all_same_v = all_same<First, Next...>::value
 
template<typename First , typename ... Next>
static constexpr bool is_one_of_v = is_one_of<First, Next...>::value
 
static constexpr int stride = 8
 
template<typename T >
static constexpr bool is_std_array_v = is_std_array<T>::value
 
template<typename T >
static constexpr bool is_eigen_array_v = is_eigen_array<T>::value
 
template<typename T >
static constexpr bool is_tuple_v = is_tuple<T>::value
 
std::unordered_map< std::size_t, std::string > ArgsName
 
SearchSpace SS
 

Detailed Description

< nsga2 selection operator for getting the front

Namespace for variation functions like crossover and mutation.

Typedef Documentation

◆ ArrayXb

typedef Eigen::Array<bool,Eigen::Dynamic,1> Brush::ArrayXb

Definition at line 39 of file types.h.

◆ ArrayXbJet

typedef Eigen::Array<bJet,Eigen::Dynamic,1> Brush::ArrayXbJet

Definition at line 51 of file types.h.

◆ ArrayXfJet

typedef Eigen::Array<fJet,Eigen::Dynamic,1> Brush::ArrayXfJet

Definition at line 49 of file types.h.

◆ ArrayXi

typedef Eigen::Array<int,Eigen::Dynamic,1> Brush::ArrayXi

Definition at line 40 of file types.h.

◆ ArrayXiJet

typedef Eigen::Array<iJet,Eigen::Dynamic,1> Brush::ArrayXiJet

Definition at line 50 of file types.h.

◆ ArrayXXb

typedef Eigen::Array<bool,Eigen::Dynamic,Eigen::Dynamic> Brush::ArrayXXb

Definition at line 41 of file types.h.

◆ ArrayXXbJet

typedef Eigen::Array<bJet,Eigen::Dynamic,Eigen::Dynamic> Brush::ArrayXXbJet

Definition at line 54 of file types.h.

◆ ArrayXXfJet

typedef Eigen::Array<fJet,Eigen::Dynamic,Eigen::Dynamic> Brush::ArrayXXfJet

Definition at line 52 of file types.h.

◆ ArrayXXi

typedef Eigen::Array<int,Eigen::Dynamic,Eigen::Dynamic> Brush::ArrayXXi

Definition at line 42 of file types.h.

◆ ArrayXXiJet

typedef Eigen::Array<iJet,Eigen::Dynamic,Eigen::Dynamic> Brush::ArrayXXiJet

Definition at line 53 of file types.h.

◆ bJet

Definition at line 47 of file types.h.

◆ ClassifierEngine

◆ ClassifierIndividual

◆ ClassifierProgram

◆ DT

Definition at line 188 of file types.h.

◆ fJet

Definition at line 45 of file types.h.

◆ iJet

typedef ceres::Jet<int, stride> Brush::iJet

Definition at line 46 of file types.h.

◆ Iter

◆ Jetify_t

template<typename T >
using Brush::Jetify_t = typename Jetify<T>::type

Definition at line 43 of file signatures.h.

◆ MulticlassClassifierEngine

◆ MulticlassClassifierIndividual

◆ MulticlassClassifierProgram

◆ NarySignature_t

template<typename R , typename Arg , size_t ArgCount>
using Brush::NarySignature_t = typename NarySignature<R,Arg,ArgCount>::type

Definition at line 157 of file signatures.h.

◆ NarySignatures_t

Definition at line 187 of file signatures.h.

◆ NT

Definition at line 129 of file node.cpp.

◆ PostIter

◆ PT

Definition at line 40 of file program.h.

◆ RegressorEngine

◆ RegressorIndividual

◆ RegressorProgram

◆ RepresenterEngine

◆ RepresenterIndividual

◆ RepresenterProgram

◆ Scalar

Definition at line 13 of file tiny_cost_function.h.

◆ TreeIter

◆ UnderlyingNodeType

using Brush::UnderlyingNodeType = std::underlying_type_t<NodeType>

Definition at line 112 of file nodetype.h.

◆ UnJetify_t

Definition at line 56 of file signatures.h.

◆ WeightType_t

Definition at line 67 of file types.h.

Enumeration Type Documentation

◆ DataType

data types.

Enumerator
ArrayB 
ArrayI 
ArrayF 
MatrixB 
MatrixI 
MatrixF 
TimeSeriesB 
TimeSeriesI 
TimeSeriesF 
ArrayBJet 
ArrayIJet 
ArrayFJet 
MatrixBJet 
MatrixIJet 
MatrixFJet 
TimeSeriesBJet 
TimeSeriesIJet 
TimeSeriesFJet 

Definition at line 143 of file types.h.

◆ NodeType

Enumerator
Abs 
Acos 
Asin 
Atan 
Cos 
Cosh 
Sin 
Sinh 
Tan 
Tanh 
Ceil 
Floor 
Exp 
Log 
Logabs 
Log1p 
Sqrt 
Sqrtabs 
Square 
Logistic 
Before 
After 
During 
Min 
Max 
Mean 
Median 
Prod 
Sum 
OffsetSum 
Softmax 
Add 
Sub 
Mul 
Div 
Pow 
SplitBest 
SplitOn 
And 
Or 
Not 
MeanLabel 
Constant 
Terminal 
ArgMax 
Count 
CustomUnaryOp 
CustomBinaryOp 
CustomSplit 

Definition at line 31 of file nodetype.h.

◆ ProgramType

Enumerator
Regressor 
BinaryClassifier 
MulticlassClassifier 
Representer 

Definition at line 70 of file types.h.

Function Documentation

◆ calc_initial_weight()

float Brush::calc_initial_weight ( const ArrayXf & value,
const ArrayXf & y )

Definition at line 7 of file search_space.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DispatchOp() [1/2]

template<typename R , NodeType NT, typename S , bool Fit>
R Brush::DispatchOp ( const Data::Dataset & d,
TreeNode & tn )
inline

Definition at line 370 of file operator.h.

Here is the call graph for this function:

◆ DispatchOp() [2/2]

template<typename R , NodeType NT, typename S , bool Fit, typename W >
R Brush::DispatchOp ( const Data::Dataset & d,
TreeNode & tn,
const W ** weights )
inline

Definition at line 363 of file operator.h.

Here is the call graph for this function:

◆ from_json() [1/3]

void Brush::from_json ( const json & j,
Fitness & f )

Definition at line 24 of file fitness.cpp.

Here is the call graph for this function:

◆ from_json() [2/3]

void Brush::from_json ( const json & j,
Node & p )

Definition at line 219 of file node.cpp.

Here is the call graph for this function:

◆ from_json() [3/3]

template<ProgramType PType>
void Brush::from_json ( const json & j,
Program< PType > & p )

Definition at line 515 of file program.h.

Here is the call graph for this function:

◆ generate_terminals()

vector< Node > Brush::generate_terminals ( const Dataset & d,
const bool weights_init )

generate terminals from the dataset features and random constants.

Parameters
da dataset
weights_initwhether the terminal prob_change should be estimated from correlations with the target value
Returns
a vector of nodes

Definition at line 51 of file search_space.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_node_with_default_signature()

void Brush::init_node_with_default_signature ( Node & node)

Definition at line 130 of file node.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Is()

template<NodeType... T>
auto Brush::Is ( NodeType nt) -> bool
inline

Definition at line 260 of file node.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsCommutative()

auto Brush::IsCommutative ( NodeType nt) -> bool
inlinenoexcept

Definition at line 269 of file node.h.

Here is the call graph for this function:

◆ IsDifferentiable()

auto Brush::IsDifferentiable ( NodeType nt) -> bool
inlinenoexcept

Definition at line 277 of file node.h.

Here is the call graph for this function:

◆ IsLeaf()

auto Brush::IsLeaf ( NodeType nt) -> bool
inlinenoexcept

Definition at line 265 of file node.h.

Here is the call graph for this function:

◆ Isnt() [1/2]

template<DataType... T>
auto Brush::Isnt ( DataType dt) -> bool
inline

Definition at line 43 of file node.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Isnt() [2/2]

template<NodeType... T>
auto Brush::Isnt ( NodeType nt) -> bool
inline

Definition at line 263 of file node.h.

Here is the call graph for this function:

◆ IsWeighable() [1/3]

template<DataType DT>
auto Brush::IsWeighable ( ) -> bool
inlinenoexcept

Definition at line 46 of file node.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsWeighable() [2/3]

auto Brush::IsWeighable ( DataType dt) -> bool
inlinenoexcept

Definition at line 54 of file node.h.

Here is the call graph for this function:

◆ IsWeighable() [3/3]

auto Brush::IsWeighable ( NodeType nt) -> bool
inlinenoexcept

Definition at line 306 of file node.h.

Here is the call graph for this function:

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE() [1/5]

Brush::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE ( Engine< PT::BinaryClassifier > ,
params ,
best_ind ,
archive  )

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE() [2/5]

Brush::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE ( Engine< PT::MulticlassClassifier > ,
params ,
best_ind ,
archive  )

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE() [3/5]

Brush::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE ( Engine< PT::Regressor > ,
params ,
best_ind ,
archive  )

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE() [4/5]

Brush::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE ( Engine< PT::Representer > ,
params ,
best_ind ,
archive  )

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE() [5/5]

Brush::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE ( Parameters ,
verbosity ,
random_state ,
pop_size ,
max_gens ,
max_stall ,
max_time ,
scorer_ ,
load_population ,
save_population ,
logfile ,
current_gen ,
num_islands ,
max_depth ,
n_jobs ,
max_size ,
objectives ,
sel ,
surv ,
cx_prob ,
mig_prob ,
classification ,
n_classes ,
validation_size ,
feature_names ,
batch_size ,
mutation_probs ,
functions  )

◆ operator&()

constexpr auto Brush::operator& ( NodeType lhs,
NodeType rhs ) -> NodeType
inlineconstexpr

Definition at line 130 of file nodetype.h.

Here is the call graph for this function:

◆ operator&=()

auto Brush::operator&= ( NodeType & lhs,
NodeType rhs ) -> NodeType&
inline

Definition at line 134 of file nodetype.h.

Here is the call graph for this function:

◆ operator<<() [1/6]

ostream & Brush::operator<< ( ostream & os,
const Node & n )

Definition at line 12 of file node.cpp.

Here is the call graph for this function:

◆ operator<<() [2/6]

ostream & Brush::operator<< ( ostream & os,
const NodeType & nt )

Definition at line 5 of file node.cpp.

Here is the call graph for this function:

◆ operator<<() [3/6]

ostream & Brush::operator<< ( ostream & os,
DataType n )

◆ operator<<() [4/6]

std::ostream & Brush::operator<< ( std::ostream & output,
const Brush::Data::TimeSeries< bool > & ts )

Definition at line 4 of file timeseries.cpp.

Here is the call graph for this function:

◆ operator<<() [5/6]

std::ostream & Brush::operator<< ( std::ostream & output,
const Brush::Data::TimeSeries< float > & ts )

Definition at line 7 of file timeseries.cpp.

Here is the call graph for this function:

◆ operator<<() [6/6]

std::ostream & Brush::operator<< ( std::ostream & output,
const Brush::Data::TimeSeries< int > & ts )

Definition at line 10 of file timeseries.cpp.

Here is the call graph for this function:

◆ operator^()

constexpr auto Brush::operator^ ( NodeType lhs,
NodeType rhs ) -> NodeType
inlineconstexpr

Definition at line 132 of file nodetype.h.

Here is the call graph for this function:

◆ operator^=()

auto Brush::operator^= ( NodeType & lhs,
NodeType rhs ) -> NodeType&
inline

Definition at line 144 of file nodetype.h.

Here is the call graph for this function:

◆ operator|()

constexpr auto Brush::operator| ( NodeType lhs,
NodeType rhs ) -> NodeType
inlineconstexpr

Definition at line 131 of file nodetype.h.

Here is the call graph for this function:

◆ operator|=()

auto Brush::operator|= ( NodeType & lhs,
NodeType rhs ) -> NodeType&
inline

Definition at line 139 of file nodetype.h.

Here is the call graph for this function:

◆ operator~()

constexpr auto Brush::operator~ ( NodeType lhs) -> NodeType
inlineconstexpr

Definition at line 133 of file nodetype.h.

Here is the call graph for this function:

◆ RandomDequeue()

template<typename T >
T Brush::RandomDequeue ( std::vector< T > & Q)

queue for make program

Definition at line 671 of file search_space.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_json() [1/3]

void Brush::to_json ( json & j,
const Fitness & f )

Definition at line 6 of file fitness.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_json() [2/3]

void Brush::to_json ( json & j,
const Node & p )

Definition at line 110 of file node.cpp.

Here is the call graph for this function:

◆ to_json() [3/3]

template<ProgramType PType>
void Brush::to_json ( json & j,
const Program< PType > & p )

Definition at line 509 of file program.h.

Here is the call graph for this function:

Variable Documentation

◆ all_same_v

template<typename First , typename ... Next>
constexpr bool Brush::all_same_v = all_same<First, Next...>::value
staticconstexpr

Definition at line 23 of file types.h.

◆ always_false_v

template<class >
constexpr bool Brush::always_false_v = false
inlineconstexpr

Definition at line 67 of file init.h.

◆ ArgsName

std::unordered_map< std::size_t, std::string > Brush::ArgsName

Definition at line 160 of file search_space.cpp.

◆ DataIDType

map< std::type_index, DataType > Brush::DataIDType = Util::reverse_map(DataTypeID)

Definition at line 47 of file data.cpp.

◆ DataNameType

map< string, DataType > Brush::DataNameType = Util::reverse_map(DataTypeName)

Definition at line 34 of file data.cpp.

◆ DataTypeID

const map< DataType, std::type_index > Brush::DataTypeID
Initial value:
= {
{DataType::ArrayB, typeid(ArrayXb)},
{DataType::ArrayI, typeid(ArrayXi)},
{DataType::ArrayF, typeid(ArrayXf)},
{DataType::MatrixB, typeid(ArrayXXb)},
{DataType::MatrixI, typeid(ArrayXXi)},
{DataType::MatrixF, typeid(ArrayXXf)},
{DataType::TimeSeriesB, typeid(Data::TimeSeriesb)},
{DataType::TimeSeriesI,typeid(Data::TimeSeriesi)},
{DataType::TimeSeriesF, typeid(Data::TimeSeriesf)},
}
Eigen::Array< bool, Eigen::Dynamic, 1 > ArrayXb
Definition functions.h:25
Eigen::Array< bool, Eigen::Dynamic, Eigen::Dynamic > ArrayXXb
Definition types.h:41
Eigen::Array< int, Eigen::Dynamic, 1 > ArrayXi
Definition types.h:40

Definition at line 36 of file data.cpp.

◆ DataTypeName

map< DataType, string > Brush::DataTypeName
Initial value:
= {
{DataType::ArrayB, "ArrayB"},
{DataType::ArrayI, "ArrayI"},
{DataType::ArrayF, "ArrayF"},
{DataType::MatrixB, "MatrixB"},
{DataType::MatrixI, "MatrixI"},
{DataType::MatrixF, "MatrixF"},
{DataType::TimeSeriesB, "TimeSeriesB"},
{DataType::TimeSeriesI,"TimeSeriesI"},
{DataType::TimeSeriesF, "TimeSeriesF"},
{DataType::ArrayBJet, "ArrayBJet"},
{DataType::ArrayIJet, "ArrayIJet"},
{DataType::ArrayFJet, "ArrayFJet"},
{DataType::MatrixBJet, "MatrixBJet"},
{DataType::MatrixIJet, "MatrixIJet"},
{DataType::MatrixFJet, "MatrixFJet"},
{DataType::TimeSeriesBJet, "TimeSeriesBJet"},
{DataType::TimeSeriesIJet,"TimeSeriesIJet"},
{DataType::TimeSeriesFJet, "TimeSeriesFJet"}
}

Definition at line 14 of file data.cpp.

◆ dtable_fit

DispatchTable< true > Brush::dtable_fit

Definition at line 5 of file dispatch_table.cpp.

◆ dtable_predict

DispatchTable< false > Brush::dtable_predict

Definition at line 6 of file dispatch_table.cpp.

◆ is_eigen_array_v

template<typename T >
constexpr bool Brush::is_eigen_array_v = is_eigen_array<T>::value
staticconstexpr

Definition at line 253 of file types.h.

◆ is_one_of_v

template<typename First , typename ... Next>
constexpr bool Brush::is_one_of_v = is_one_of<First, Next...>::value
staticconstexpr

Definition at line 33 of file types.h.

◆ is_std_array_v

template<typename T >
constexpr bool Brush::is_std_array_v = is_std_array<T>::value
staticconstexpr

Definition at line 245 of file types.h.

◆ is_tuple_v

template<typename T >
constexpr bool Brush::is_tuple_v = is_tuple<T>::value
staticconstexpr

Definition at line 259 of file types.h.

◆ MAX_ARGS

constexpr size_t Brush::MAX_ARGS = 5
staticconstexpr

Definition at line 30 of file signatures.h.

◆ NodeNameType

std::map< std::string, NodeType > Brush::NodeNameType

Definition at line 5 of file nodetype.cpp.

◆ NodeTypeName

std::map< NodeType, std::string > Brush::NodeTypeName = Util::reverse_map(NodeNameType)

Definition at line 81 of file nodetype.cpp.

◆ SS

SearchSpace Brush::SS
extern

◆ Stack

template<typename T >
constexpr auto Brush::Stack
constexpr
Initial value:
= [](auto m, auto... ms) {
return ((Array<T,-1,-1>(m.rows(),1+sizeof...(ms))<<m),...,ms).finished();
}
void bind_engine(py::module &m, string name)

Stacks Eigen arrays into a 2d-array, where each array is a column.

Template Parameters
T: underlying type in array

Definition at line 408 of file functions.h.

◆ stride

constexpr int Brush::stride = 8
staticconstexpr

Definition at line 44 of file types.h.