C++ API
The API below mostly covers C++ code that can be called from Python.
See also
For the full C++ API, browse the Doxygen docs.
- Dataset
Brush::Data::Datasetoperator()()init()make_features()copy_and_make_features()Dataset()Dataset()Dataset()Dataset()print()get_X()get_training_data()get_validation_data()get_n_samples()get_n_features()get_batch()get_batch_size()set_batch_size()get_feature_type()split()operator[]()unique_data_typesfeature_typesfeature_namesfeatures_of_typefeaturesyclassificationXrefvalidation_sizeuse_validationshuffle_splitbatch_sizeuse_batch
- TimeSeries
Brush::Data::TimeSeriesScalarEntryTypeValTypeTimeTypeTimeSeries()TimeSeries()operator()()size()rows()cols()begin()end()cbegin()cend()tbegin()tend()ctbegin()ctend()transform()reduce()cast()abs()pow()log()logabs()log1p()ceil()floor()exp()sin()cos()tan()asin()acos()atan()sinh()cosh()tanh()sqrt()sqrtabs()square()median()mean()std()max()min()sum()count()prod()operator*()before()after()during()print()timevalueNumDimensions
- SearchSpace
Brush::SearchSpaceArgsHashMapmake_program()make_regressor()make_classifier()make_multiclass_classifier()make_representer()SearchSpace()SearchSpace()init()check()check()check()has_solution_space()get()get()get_weights()get_weights()get_weights()sample_terminal()sample_terminal()sample_op()sample_op()sample_op_with_arg()get_node_like()sample_subtree()print()repr()make_program()node_mapnode_map_weightsterminal_mapterminal_weightsterminal_typesop_names
- Program
Brush::ProgramRetTypeTreeTypeProgram()Program()copy()set_search_space()complexity()linear_complexity()size()size_at()depth()depth_at()depth_to_reach()fit()predict_with_weights()predict_with_weights()predict()predict()predict()predict_proba()fit()predict()predict_proba()update_weights()get_n_weights()get_weights()set_weights()lock_nodes()get_model()get_dot_model()linearize()is_fitted_TreeSSrefprogram_type
- Node
Brush::NodeHashTupleNode()Node()set_signature()init()get_name()get_model()get_ret_type()args_type()get_arg_types()get_arg_count()get_node_hash()operator==()operator!=()operator<()operator<=()operator>()operator>=()get_prob_change()set_prob_change()get_prob_keep()set_feature()get_feature()set_feature_type()get_feature_type()set_keep_split_feature()get_keep_split_feature()get_is_weighted()set_is_weighted()namenode_typeret_typearg_typessig_hashsig_dual_hashfixedis_weightedprob_changeWcenter_opfeaturefeature_typekeep_split_feature
- NodeTypes
NodeTypeAbsAcosAsinAtanCosCoshSinSinhTanTanhCeilFloorExpLogLogabsLog1pSqrtSqrtabsSquareLogisticBeforeAfterDuringMinMaxMeanMedianProdSumOffsetSumSoftmaxAddSubMulDivPowSplitBestSplitOnAndOrNotMeanLabelConstantTerminalArgMaxCountCustomUnaryOpCustomBinaryOpCustomSplit
- Individual and Fitness
Brush::Pop::IndividualIndividual()Individual()init()fit()fit()predict()predict()predict_proba()predict_proba()get_size()get_depth()get_complexity()get_linear_complexity()get_program()get_model()get_dot_model()set_fitness()get_fitness()set_variation()get_variation()get_is_fitted()set_is_fitted()set_sampled_nodes()get_sampled_nodes()get_id()set_id()set_parents()set_parents()get_objectives()set_objectives()programis_fitted_idparent_idvariationsampled_nodeserrorfitnessobjectivesweightsMap
Brush::Fitnessset_dominated()get_dominated()set_loss()get_loss()get_prev_loss()set_loss_v()get_loss_v()get_prev_loss_v()set_size()get_size()get_prev_size()set_complexity()get_complexity()get_prev_complexity()set_linear_complexity()get_linear_complexity()get_prev_linear_complexity()set_depth()get_depth()get_prev_depth()set_dcounter()get_dcounter()set_rank()get_rank()set_crowding_dist()get_crowding_dist()Fitness()hash()set_weights()get_weights()get_values()get_wvalues()set_values()clearValues()valid()operator==()operator!=()operator<()operator>()operator<=()operator>=()toString()repr()dominates()lossloss_vcomplexitylinear_complexitysizedepthprev_lossprev_loss_vprev_complexityprev_linear_complexityprev_sizeprev_depthdcounterdominatedrankcrowding_distvaluesweightswvalues
- Evaluation
- Population
Brush::Pop::PopulationPopulation()~Population()init()init()save()load()size()get_island_indexes()add_offspring_indexes()update()operator[]()operator[]()print_models()sorted_front()hall_of_fame()migrate()pop_sizenum_islandsmig_problinear_complexityindividualsisland_indexesBrush::Pop::Population::SameFitComplexityBrush::Pop::Population::SortComplexityBrush::Pop::Population::SortLinearComplexity
- Variation (Crossover/Mutation)
- Selection
- Archive
- Engine (and parameters)
Brush::ParametersParameters()~Parameters()set_verbosity()get_verbosity()set_random_state()get_random_state()set_pop_size()get_pop_size()set_max_gens()get_max_gens()set_bandit()get_bandit()set_max_stall()get_max_stall()set_max_time()get_max_time()set_scorer()get_scorer()set_load_population()get_load_population()set_save_population()get_save_population()get_logfile()set_logfile()set_current_gen()get_current_gen()set_num_islands()get_num_islands()set_max_depth()get_max_depth()set_n_jobs()get_n_jobs()set_max_size()get_max_size()set_objectives()get_objectives()set_sel()get_sel()set_surv()get_surv()set_cx_prob()get_cx_prob()set_mig_prob()get_mig_prob()set_classification()get_classification()set_shuffle_split()get_shuffle_split()set_constants_simplification()get_constants_simplification()set_inexact_simplification()get_inexact_simplification()set_weights_init()get_weights_init()set_n_classes()set_class_weights()set_sample_weights()get_n_classes()get_class_weights()get_sample_weights()get_class_weights_type()set_class_weights_type()set_validation_size()get_validation_size()set_feature_names()get_feature_names()set_feature_types()get_feature_types()set_batch_size()get_batch_size()set_mutation_probs()get_mutation_probs()set_functions()get_functions()random_stateverbositymodecurrent_genpop_sizemax_gensmax_stallmax_timemax_depthmax_sizeobjectivesbanditselsurvfunctionsnum_islandsconstants_simplificationinexact_simplificationmutation_probscx_probmig_probscorerclassesclass_weightssample_weightsclass_weights_typeclassificationn_classesshuffle_splitvalidation_sizefeature_namesfeature_typesbatch_sizeweights_initload_populationsave_populationlogfilen_jobs
Brush::EngineEngine()Engine()~Engine()print_progress()calculate_stats()print_stats()log_stats()get_params()set_params()get_search_space()set_search_space()get_is_fitted()update_best()get_best_ind()fit()fit()predict()predict()predict_proba()predict_proba()get_archive_size()get_archive_as_json()get_population_as_json()set_population_from_json()get_archive()get_population()set_population()lock_nodes()run()paramsssbest_indarchivepopis_fitted