def _setRandomEncoderResolution(minResolution=0.001):
 encoder = model_params.MODEL_PARAMS['modelParams']['sensorParams']['encoders']['value']
 if (encoder['type'] == 'RandomDistributedScalarEncoder'):
  rangePadding = (abs((_INPUT_MAX - _INPUT_MIN)) * 0.2)
  minValue = (_INPUT_MIN - rangePadding)
  maxValue = (_INPUT_MAX + rangePadding)
  resolution = max(minResolution, ((maxValue - minValue) / encoder.pop('numBuckets')))
  encoder['resolution'] = resolution

def _setRandomEncoderResolution ( minResolution = 0.001 ) : encoder = model_params . MODEL_PARAMS [ 'modelParams' ] [ 'sensorParams' ] [ 'encoders' ] [ 'value' ] if ( encoder [ 'type' ] == 'RandomDistributedScalarEncoder' ) : rangePadding = ( abs ( ( _INPUT_MAX - _INPUT_MIN ) ) * 0.2 ) minValue = ( _INPUT_MIN - rangePadding ) maxValue = ( _INPUT_MAX + rangePadding ) resolution = max ( minResolution , ( ( maxValue - minValue ) / encoder . pop ( 'numBuckets' ) ) ) encoder [ 'resolution' ] = resolution
given model params .