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); 148throw _host.Except(new Exception(errorMessage), errorMessage); 159_host.Assert(Utils.Size(previousRuns) > 1); 179_host.Assert(history.Length == weights.Length && parentIndicies.Max() < history.Length); 204float[] child = SweeperProbabilityUtils.ParameterSetAsFloatArray(_host, _sweepParameters, parent, false); 235_host.Check(parameterNumeric != null, "KDO sweeper can only sweep over discrete and numeric parameters"); 279return 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);