1 write to _options
Microsoft.ML.Sweeper (1)
54 references to _options
Microsoft.ML.Sweeper (54)
Parameters.cs (54)
217public string Name { get { return _options.Name; } }
233if (_options.LogBase)
236var logBase = !_options.StepSize.HasValue
237? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1))
238: _options.StepSize.Value;
239var logMax = Math.Log(_options.Max, logBase);
240var logMin = Math.Log(_options.Min, logBase);
241val = (long)(_options.Min * Math.Pow(logBase, normalizedValue * (logMax - logMin)));
244val = (long)(_options.Min + normalizedValue * (_options.Max - _options.Min));
246return new LongParameterValue(_options.Name, val);
255if ((_options.StepSize == null && _options.NumSteps > (_options.Max - _options.Min)) ||
256(_options.StepSize != null && _options.StepSize <= 1))
258for (long i = _options.Min; i <= _options.Max; i++)
259result.Add(new LongParameterValue(_options.Name, i));
263if (_options.LogBase)
266var logBase = _options.StepSize ?? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1));
269var maxPlusEpsilon = _options.Max * Math.Sqrt(logBase);
270for (Double value = _options.Min; value <= maxPlusEpsilon; value *= logBase)
274result.Add(new LongParameterValue(_options.Name, longValue));
280var stepSize = _options.StepSize ?? (Double)(_options.Max - _options.Min) / (_options.NumSteps - 1);
282var maxPlusEpsilon = _options.Max + stepSize / 2;
283for (Double value = _options.Min; value <= maxPlusEpsilon; value += stepSize)
287result.Add(new LongParameterValue(_options.Name, longValue));
317Contracts.Check(_options.Min <= valueTyped.Value && valueTyped.Value <= _options.Max, "Value not in correct range");
319if (_options.LogBase)
321float logBase = (float)(_options.StepSize ?? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1)));
322return (float)((Math.Log(valueTyped.Value, logBase) - Math.Log(_options.Min, logBase)) / (Math.Log(_options.Max, logBase) - Math.Log(_options.Min, logBase)));
325return (float)(valueTyped.Value - _options.Min) / (_options.Max - _options.Min);
332return (_options.Min <= valueTyped.Value && valueTyped.Value <= _options.Max);
337return $" p=lp{{{CmdParser.GetSettings(env, _options, new LongParamOptions())}}}";