1 write to _args
Microsoft.ML.AutoML (1)
Sweepers\Parameters.cs (1)
218
_args
= args;
53 references to _args
Microsoft.ML.AutoML (53)
Sweepers\Parameters.cs (53)
209
public string Name { get { return
_args
.Name; } }
225
if (
_args
.LogBase)
228
var logBase = !
_args
.StepSize.HasValue
229
? Math.Pow(1.0 *
_args
.Max /
_args
.Min, 1.0 / (
_args
.NumSteps - 1))
230
:
_args
.StepSize.Value;
231
var logMax = Math.Log(
_args
.Max, logBase);
232
var logMin = Math.Log(
_args
.Min, logBase);
233
val = (long)(
_args
.Min * Math.Pow(logBase, normalizedValue * (logMax - logMin)));
236
val = (long)(
_args
.Min + normalizedValue * (
_args
.Max -
_args
.Min));
238
return new LongParameterValue(
_args
.Name, val);
247
if ((
_args
.StepSize == null &&
_args
.NumSteps > (
_args
.Max -
_args
.Min)) ||
248
(
_args
.StepSize != null &&
_args
.StepSize <= 1))
250
for (long i =
_args
.Min; i <=
_args
.Max; i++)
251
result.Add(new LongParameterValue(
_args
.Name, i));
255
if (
_args
.LogBase)
258
var logBase =
_args
.StepSize ?? Math.Pow(1.0 *
_args
.Max /
_args
.Min, 1.0 / (
_args
.NumSteps - 1));
261
var maxPlusEpsilon =
_args
.Max * Math.Sqrt(logBase);
262
for (Double value =
_args
.Min; value <= maxPlusEpsilon; value *= logBase)
266
result.Add(new LongParameterValue(
_args
.Name, longValue));
272
var stepSize =
_args
.StepSize ?? (Double)(
_args
.Max -
_args
.Min) / (
_args
.NumSteps - 1);
274
var maxPlusEpsilon =
_args
.Max + stepSize / 2;
275
for (Double value =
_args
.Min; value <= maxPlusEpsilon; value += stepSize)
279
result.Add(new LongParameterValue(
_args
.Name, longValue));
309
Runtime.Contracts.Assert(
_args
.Min <= valueTyped.Value && valueTyped.Value <=
_args
.Max, "Value not in correct range");
311
if (
_args
.LogBase)
313
float logBase = (float)(
_args
.StepSize ?? Math.Pow(1.0 *
_args
.Max /
_args
.Min, 1.0 / (
_args
.NumSteps - 1)));
314
return (float)((Math.Log(valueTyped.Value, logBase) - Math.Log(
_args
.Min, logBase)) / (Math.Log(
_args
.Max, logBase) - Math.Log(
_args
.Min, logBase)));
317
return (float)(valueTyped.Value -
_args
.Min) / (
_args
.Max -
_args
.Min);
323
return (
_args
.Min <= valueTyped.Value && valueTyped.Value <=
_args
.Max);