1 write to _options
Microsoft.ML.Sweeper (1)
Parameters.cs (1)
358_options = options;
45 references to _options
Microsoft.ML.Sweeper (45)
Parameters.cs (45)
349public string Name { get { return _options.Name; } } 365if (_options.LogBase) 368var logBase = !_options.StepSize.HasValue 369? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1)) 370: _options.StepSize.Value; 371var logMax = Math.Log(_options.Max, logBase); 372var logMin = Math.Log(_options.Min, logBase); 373val = (float)(_options.Min * Math.Pow(logBase, normalizedValue * (logMax - logMin))); 376val = (float)(_options.Min + normalizedValue * (_options.Max - _options.Min)); 378return new FloatParameterValue(_options.Name, val); 387if (_options.LogBase) 390var logBase = _options.StepSize ?? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1)); 393var maxPlusEpsilon = _options.Max * Math.Sqrt(logBase); 394for (Double value = _options.Min; value <= maxPlusEpsilon; value *= logBase) 398result.Add(new FloatParameterValue(_options.Name, floatValue)); 404var stepSize = _options.StepSize ?? (Double)(_options.Max - _options.Min) / (_options.NumSteps - 1); 406var maxPlusEpsilon = _options.Max + stepSize / 2; 407for (Double value = _options.Min; value <= maxPlusEpsilon; value += stepSize) 411result.Add(new FloatParameterValue(_options.Name, floatValue)); 441Contracts.Check(_options.Min <= valueTyped.Value && valueTyped.Value <= _options.Max, "Value not in correct range"); 443if (_options.LogBase) 445float logBase = (float)(_options.StepSize ?? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1))); 446return (float)((Math.Log(valueTyped.Value, logBase) - Math.Log(_options.Min, logBase)) / (Math.Log(_options.Max, logBase) - Math.Log(_options.Min, logBase))); 449return (valueTyped.Value - _options.Min) / (_options.Max - _options.Min); 456return (_options.Min <= valueTyped.Value && valueTyped.Value <= _options.Max); 461return $" p=fp{{{CmdParser.GetSettings(env, _options, new FloatParamOptions())}}}";