Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Morgansy/Genetic-Alpha
/ functions
Functions
89 in github.com/Morgansy/Genetic-Alpha
⨍
Functions
89
◇
Types & classes
7
↓ 5 callers
Method
execute
Execute the program according to X. Parameters ---------- X : {array-like}, shape = [n_samples, n_features] Train
_program.py:417
↓ 4 callers
Method
raw_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 callers
Method
__init__
(self, population_size=1000, hall_of_fame=None, n_component
genetic.py:188
↓ 3 callers
Function
check_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 callers
Function
get_subtree_func
Return a subtree from a given program often called by donor
_program.py:43
↓ 2 callers
Method
__str__
Overloads `print` output of the object to resemble a LISP tree.
genetic.py:923
↓ 2 callers
Method
__str__
Overloads `print` output of the object to resemble a LISP tree.
_program.py:313
↓ 2 callers
Function
_tournament
Find the fittest individual from a sub-population.
genetic.py:58
↓ 2 callers
Method
_verbose_reporter
A report of the progress of the evolution process. Parameters ---------- run_details : dict Information about the
genetic.py:241
↓ 2 callers
Method
build_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 callers
Method
crossover
Perform the crossover genetic operation on the program. Crossover selects a random subtree from the embedded program to be replac
_program.py:607
↓ 2 callers
Method
fit
Fit the Genetic Program according to X, y. Parameters ---------- X : array-like, shape = [n_samples, n_features]
genetic.py:282
↓ 2 callers
Method
fitness
Evaluate the penalized fitness of the program according to X, y. Parameters ---------- parsimony_coefficient : float, optiona
_program.py:544
↓ 2 callers
Function
get_subtree_con
Return a constant node from a given program, which is usually a donor often called by donor
_program.py:17
↓ 1 callers
Function
_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 callers
Function
_partition_estimators
Private function used to partition estimators between jobs.
utils.py:65
↓ 1 callers
Function
_weighted_pearson
Calculate the weighted Pearson correlation coefficient.
fitness.py:103
↓ 1 callers
Function
genBetterFormula
输入fit后的est_gp和fitness的阈值,从最后一代选出超过阈值的公式
demo.py:14
↓ 1 callers
Method
get_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 callers
Method
get_subtree
Get a random subtree from the program. Parameters ---------- random_state : RandomState instance The random n
_program.py:564
↓ 1 callers
Function
get_subtree_var
Return a variable node from a given program, which is usually a donor often called by donor
_program.py:30
↓ 1 callers
Method
hoist_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 callers
Method
point_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 callers
Method
predict_proba
Predict probabilities on test vectors X. Parameters ---------- X : array-like, shape = [n_samples, n_features] In
genetic.py:1210
↓ 1 callers
Method
reproduce
Return a copy of the embedded program.
_program.py:603
↓ 1 callers
Method
subtree_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 callers
Method
transform
Transform X according to the fitted transformer. Parameters ---------- X : array-like, shape = [n_samples, n_features]
genetic.py:1531
↓ 1 callers
Method
validate_program
Rough check that the embedded program in the object is valid.
_program.py:300
Function
ICIR
(y, y_pred, w)
demo.py:36
Function
IR
(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
Method
export_graphviz
Returns a string, Graphviz script for visualizing the program. Parameters ---------- fade_nodes : list, optional
_program.py:338
Method
fit_transform
Fit to data, then transform it. Parameters ---------- X : array-like, shape = [n_samples, n_features] Training ve
genetic.py:1561
Function
make_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
Function
make_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
Method
predict
Perform regression on test vectors X. Parameters ---------- X : array-like, shape = [n_samples, n_features] Input
genetic.py:929
Method
predict
Predict classes on test vectors X. Parameters ---------- X : array-like, shape = [n_samples, n_features] Input ve
genetic.py:1242