-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Hi,
is there a way to penalize the magnitude of the constants (via, e.g., L2 regularization)? I am trying to fit a SymbolicRegressor
with some noisy data and sometimes I get very large values for some constants.
I looked inside the library and it seems that it is possible to choose, as constant optimizer, adamax
and amsgrad
:
def __init_sgd_update_rule(self):
if self.sgd_update_rule == 'constant':
return op.ConstantUpdateRule(0, self.sgd_learning_rate)
elif self.sgd_update_rule == 'momentum':
return op.MomentumUpdateRule(0, self.sgd_learning_rate, self.sgd_beta)
elif self.sgd_update_rule == 'rmsprop':
return op.RmsPropUpdateRule(0, self.sgd_learning_rate, self.sgd_beta, self.sgd_epsilon)
elif self.sgd_update_rule == 'adamax':
return op.AdaMaxUpdateRule(0, self.sgd_learning_rate, self.sgd_beta, self.sgd_beta2)
elif self.sgd_update_rule == 'amsgrad':
return op.AmsGradUpdateRule(0, self.sgd_learning_rate, self.sgd_epsilon, self.sgd_beta, self.sgd_beta2)
raise ValueError('Unknown update rule {}'.format(self.sgd_update_rule))
In the pytorch
implementation of these optimizers there is a parameter weight_decay
for the pyoperon
.
Metadata
Metadata
Assignees
Labels
No labels