MCPcopy Create free account

hub / github.com/Morgansy/Genetic-Alpha / functions

Functions89 in github.com/Morgansy/Genetic-Alpha

↓ 5 callersMethodexecute
Execute the program according to X. Parameters ---------- X : {array-like}, shape = [n_samples, n_features] Train
_program.py:417
↓ 4 callersMethodraw_fitness
Evaluate the raw fitness of the program according to X, y. Parameters ---------- X : {array-like}, shape = [n_samples, n_feat
_program.py:516
↓ 3 callersMethod__init__
(self, population_size=1000, hall_of_fame=None, n_component
genetic.py:188
↓ 3 callersFunctioncheck_random_state
Turn seed into a np.random.RandomState instance Parameters ---------- seed : None | int | instance of RandomState If seed is None
utils.py:15
↓ 3 callersFunctionget_subtree_func
Return a subtree from a given program often called by donor
_program.py:43
↓ 2 callersMethod__str__
Overloads `print` output of the object to resemble a LISP tree.
genetic.py:923
↓ 2 callersMethod__str__
Overloads `print` output of the object to resemble a LISP tree.
_program.py:313
↓ 2 callersFunction_tournament
Find the fittest individual from a sub-population.
genetic.py:58
↓ 2 callersMethod_verbose_reporter
A report of the progress of the evolution process. Parameters ---------- run_details : dict Information about the
genetic.py:241
↓ 2 callersMethodbuild_program
Build a naive random program. ## edited by Yan: every time we append a function node to the program, we append the
_program.py:215
↓ 2 callersMethodcrossover
Perform the crossover genetic operation on the program. Crossover selects a random subtree from the embedded program to be replac
_program.py:607
↓ 2 callersMethodfit
Fit the Genetic Program according to X, y. Parameters ---------- X : array-like, shape = [n_samples, n_features]
genetic.py:282
↓ 2 callersMethodfitness
Evaluate the penalized fitness of the program according to X, y. Parameters ---------- parsimony_coefficient : float, optiona
_program.py:544
↓ 2 callersFunctionget_subtree_con
Return a constant node from a given program, which is usually a donor often called by donor
_program.py:17
↓ 1 callersFunction_get_n_jobs
Get number of jobs for the computation. This function reimplements the logic of joblib to determine the actual number of jobs depending on th
utils.py:37
↓ 1 callersFunction_partition_estimators
Private function used to partition estimators between jobs.
utils.py:65
↓ 1 callersFunction_weighted_pearson
Calculate the weighted Pearson correlation coefficient.
fitness.py:103
↓ 1 callersFunctiongenBetterFormula
输入fit后的est_gp和fitness的阈值,从最后一代选出超过阈值的公式
demo.py:14
↓ 1 callersMethodget_all_indices
Get the indices on which to evaluate the fitness of a program. Parameters ---------- n_samples : int The number o
_program.py:465
↓ 1 callersMethodget_subtree
Get a random subtree from the program. Parameters ---------- random_state : RandomState instance The random n
_program.py:564
↓ 1 callersFunctionget_subtree_var
Return a variable node from a given program, which is usually a donor often called by donor
_program.py:30
↓ 1 callersMethodhoist_mutation
Perform the hoist mutation operation on the program. Hoist mutation selects a random subtree from the embedded program to be repl
_program.py:676
↓ 1 callersMethodpoint_mutation
Perform the point mutation operation on the program. Point mutation selects random nodes from the embedded program to be replaced
_program.py:707
↓ 1 callersMethodpredict_proba
Predict probabilities on test vectors X. Parameters ---------- X : array-like, shape = [n_samples, n_features] In
genetic.py:1210
↓ 1 callersMethodreproduce
Return a copy of the embedded program.
_program.py:603
↓ 1 callersMethodsubtree_mutation
Perform the subtree mutation operation on the program. Subtree mutation selects a random subtree from the embedded program to be repl
_program.py:650
↓ 1 callersMethodtransform
Transform X according to the fitted transformer. Parameters ---------- X : array-like, shape = [n_samples, n_features]
genetic.py:1531
↓ 1 callersMethodvalidate_program
Rough check that the embedded program in the object is valid.
_program.py:300
FunctionICIR
(y, y_pred, w)
demo.py:36
FunctionIR
(y, y_pred, w)
demo.py:24
Method__call__
(self, *args)
functions.py:48
Method__call__
(self, *args)
fitness.py:45
Method__getitem__
Return the ith item of the fitted components.
genetic.py:1518
Method__init__
(self, population_size=1000, generations=20, tournament_siz
genetic.py:876
Method__init__
(self, population_size=1000, generations=20, tournament_siz
genetic.py:1155
Method__init__
(self, population_size=1000, hall_of_fame=100, n_components
genetic.py:1461
Method__init__
(self, function, name, arity, para)
functions.py:42
Method__init__
(self, function, greater_is_better)
fitness.py:40
Method__init__
(self, function_set, arities, paras, init_
_program.py:171
Method__len__
Overloads `len` output to be the number of fitted components.
genetic.py:1512
Method__str__
Overloads `print` output of the object to resemble a LISP tree.
genetic.py:1204
Method__str__
Overloads `print` output of the object to resemble LISP trees.
genetic.py:1524
Function_correlation
(x1,x2,d=5)
functions.py:191
Function_covariance
(x1,x2,d=5)
functions.py:181
Function_decay_linear
(x1,d=5)
functions.py:206
Function_delay
(x1,d=5)
functions.py:168
Function_delta
(x1,d=5)
functions.py:202
Method_depth
Calculates the maximum depth of the program tree.
_program.py:398
Function_ifcondition_e
(condition_var1, condition_var2, x1, x2)
functions.py:350
Function_ifcondition_g
(condition_var1, condition_var2, x1, x2)
functions.py:325
Function_ifcondition_ge
(condition_var1, condition_var2, x1, x2)
functions.py:338
Method_indices
Get the indices used to measure the program's fitness.
_program.py:512
Function_indneutral
(x1)
functions.py:395
Method_length
Calculates the number of functions and terminals in the program.
_program.py:413
Function_log_loss
Calculate the log loss.
fitness.py:139
Function_mean_absolute_error
Calculate the mean absolute error.
fitness.py:124
Function_mean_square_error
Calculate the mean square error.
fitness.py:129
Function_parallel_evolve
Private function used to build a batch of programs within a job.
genetic.py:37
Function_protected_division
Closure of division (x1/x2) for zero denominator.
functions.py:127
Function_protected_inverse
Closure of inverse for zero arguments.
functions.py:145
Function_protected_log
Closure of log for zero arguments.
functions.py:139
Function_protected_sqrt
Closure of square root for negative arguments.
functions.py:133
Function_rank
(x1)
functions.py:156
Function_root_mean_square_error
Calculate the root mean square error.
fitness.py:134
Function_scale
(x1, a=1)
functions.py:160
Function_sigmoid
Special case of logistic function to transform to probabilities.
functions.py:151
Function_signedpower
(x1, a=2)
functions.py:164
Function_ts_argmax
(x1, d=5)
functions.py:253
Function_ts_argmin
(x1, d=5)
functions.py:261
Function_ts_count
(condition_var1, condition_var2, d=5)
functions.py:372
Function_ts_highday
(x1, d=5)
functions.py:379
Function_ts_lowday
(x1, d=5)
functions.py:387
Function_ts_max
(X, d=5)
functions.py:285
Function_ts_mean
(X, d=5)
functions.py:297
Function_ts_min
(X, d=5)
functions.py:291
Function_ts_product
(x1, d=5)
functions.py:269
Function_ts_rank
(x1,d=5)
functions.py:277
Function_ts_sma
(x1,n,m)
functions.py:303
Function_ts_stddev
(X, d=5)
functions.py:214
Function_ts_sum
(X, d=5)
functions.py:227
Function_ts_sumif
(x1, condition_var1, condition_var2, d=5)
functions.py:362
Function_ts_wma
(x1,d=5)
functions.py:315
Function_weighted_spearman
Calculate the weighted Spearman correlation coefficient.
fitness.py:117
Methodexport_graphviz
Returns a string, Graphviz script for visualizing the program. Parameters ---------- fade_nodes : list, optional
_program.py:338
Methodfit_transform
Fit to data, then transform it. Parameters ---------- X : array-like, shape = [n_samples, n_features] Training ve
genetic.py:1561
Functionmake_fitness
Make a fitness measure, a metric scoring the quality of a program's fit. This factory function creates a fitness measure object which measures th
fitness.py:49
Functionmake_function
Make a function node, a representation of a mathematical relationship. This factory function creates a function node, one of the core nodes in an
functions.py:52
Methodpredict
Perform regression on test vectors X. Parameters ---------- X : array-like, shape = [n_samples, n_features] Input
genetic.py:929
Methodpredict
Predict classes on test vectors X. Parameters ---------- X : array-like, shape = [n_samples, n_features] Input ve
genetic.py:1242