@@ -520,6 +520,9 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
520520 weight_mutate_operator : float
521521 Relative likelihood for mutation to swap an operator.
522522 Default is `0.293`.
523+ weight_mutate_feature : float
524+ Relative likelihood for mutation to change which feature a variable node references.
525+ Default is `0.1`.
523526 weight_swap_operands : float
524527 Relative likehood for swapping operands in binary operators.
525528 Default is `0.198`.
@@ -890,6 +893,7 @@ def __init__(
890893 weight_do_nothing : float = 0.273 ,
891894 weight_mutate_constant : float = 0.0346 ,
892895 weight_mutate_operator : float = 0.293 ,
896+ weight_mutate_feature : float = 0.1 ,
893897 weight_swap_operands : float = 0.198 ,
894898 weight_rotate_tree : float = 4.26 ,
895899 weight_randomize : float = 0.000502 ,
@@ -1004,6 +1008,7 @@ def __init__(
10041008 self .weight_do_nothing = weight_do_nothing
10051009 self .weight_mutate_constant = weight_mutate_constant
10061010 self .weight_mutate_operator = weight_mutate_operator
1011+ self .weight_mutate_feature = weight_mutate_feature
10071012 self .weight_swap_operands = weight_swap_operands
10081013 self .weight_rotate_tree = weight_rotate_tree
10091014 self .weight_randomize = weight_randomize
@@ -2036,6 +2041,7 @@ def _run(
20362041 mutation_weights = SymbolicRegression .MutationWeights (
20372042 mutate_constant = self .weight_mutate_constant ,
20382043 mutate_operator = self .weight_mutate_operator ,
2044+ mutate_feature = self .weight_mutate_feature ,
20392045 swap_operands = self .weight_swap_operands ,
20402046 rotate_tree = self .weight_rotate_tree ,
20412047 add_node = self .weight_add_node ,
0 commit comments