1 write to _host
Microsoft.ML.Sweeper (1)
Algorithms\KdoSweeper.cs (1)
91
_host
= env.Register("Sweeper");
19 references to _host
Microsoft.ML.Sweeper (19)
Algorithms\KdoSweeper.cs (19)
93
_host
.CheckUserArg(options.NumberInitialPopulation > 1, nameof(options.NumberInitialPopulation), "Must be greater than 1");
94
_host
.CheckUserArg(options.HistoryLength > 1, nameof(options.HistoryLength), "Must be greater than 1");
95
_host
.CheckUserArg(options.MinimumMutationSpread >= 0, nameof(options.MinimumMutationSpread), "Must be nonnegative");
96
_host
.CheckUserArg(0 <= options.ProportionRandom && options.ProportionRandom <= 1, nameof(options.ProportionRandom), "Must be in [0, 1]");
97
_host
.CheckUserArg(options.WeightRescalingPower >= 1, nameof(options.WeightRescalingPower), "Must be greater or equal to 1");
100
_host
.CheckUserArg(Utils.Size(options.SweptParameters) > 0, nameof(options.SweptParameters), "KDO sweeper needs at least one parameter to sweep over");
101
_sweepParameters = options.SweptParameters.Select(p => p.CreateComponent(
_host
)).ToArray();
104
_spu = new SweeperProbabilityUtils(
_host
);
148
throw
_host
.Except(new Exception(errorMessage), errorMessage);
159
_host
.Assert(Utils.Size(previousRuns) > 1);
179
_host
.Assert(history.Length == weights.Length && parentIndicies.Max() < history.Length);
204
float[] child = SweeperProbabilityUtils.ParameterSetAsFloatArray(
_host
, _sweepParameters, parent, false);
235
_host
.Check(parameterNumeric != null, "KDO sweeper can only sweep over discrete and numeric parameters");
279
return SweeperProbabilityUtils.FloatArrayAsParameterSet(
_host
, _sweepParameters, child, false);
446
_host
.AssertNonEmpty(weights);
447
_host
.Assert(weights.Sum() > 0);
455
_host
.Assert(d > 0 && diagonalCovariance.Length == d);
458
_host
.Assert(diagonalCovariance[i].Length == d);
461
_host
.Assert((i == j && diagonalCovariance[i][j] >= 0) || diagonalCovariance[i][j] == 0);