Commit cf49a222 authored by Matthijs's avatar Matthijs
Browse files

when lambda is not given, default to the values for beta

parent 58bf802a
......@@ -13,6 +13,16 @@ from numpy import exp
class DRl(SimpleAlgorithm):
def __init__(self, config):
super(DRl, self).__init__(config)
for parameter_key_extension in ['_0', '_max', '_switch']:
key = 'lambda'+parameter_key_extension
alternative = 'beta'+parameter_key_extension
try:
if key not in config:
config[key] = config[alternative]
except KeyError:
raise KeyError('config should contain %s, or %s must be given as alternative')
def evaluate(self, u):
iter = self.config['iter'] + 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment