1 write to _host
Microsoft.ML.Sweeper (1)
Algorithms\SmacSweeper.cs (1)
71
_host
= env.Register("Sweeper");
30 references to _host
Microsoft.ML.Sweeper (30)
Algorithms\SmacSweeper.cs (30)
73
_host
.CheckUserArg(options.NumOfTrees > 0, nameof(options.NumOfTrees), "parameter must be greater than 0");
74
_host
.CheckUserArg(options.NMinForSplit > 1, nameof(options.NMinForSplit), "parameter must be greater than 1");
75
_host
.CheckUserArg(options.SplitRatio > 0 && options.SplitRatio <= 1, nameof(options.SplitRatio), "parameter must be in range (0,1].");
76
_host
.CheckUserArg(options.NumberInitialPopulation > 1, nameof(options.NumberInitialPopulation), "parameter must be greater than 1");
77
_host
.CheckUserArg(options.LocalSearchParentCount > 0, nameof(options.LocalSearchParentCount), "parameter must be greater than 0");
78
_host
.CheckUserArg(options.NumRandomEISearchConfigurations > 0, nameof(options.NumRandomEISearchConfigurations), "parameter must be greater than 0");
79
_host
.CheckUserArg(options.NumNeighborsForNumericalParams > 0, nameof(options.NumNeighborsForNumericalParams), "parameter must be greater than 0");
82
_host
.CheckUserArg(Utils.Size(options.SweptParameters) > 0, nameof(options.SweptParameters), "SMAC sweeper needs at least one parameter to sweep over");
83
_sweepParameters = options.SweptParameters.Select(p => p.CreateComponent(
_host
)).ToArray();
120
features[i] = SweeperProbabilityUtils.ParameterSetAsFloatArray(
_host
, _sweepParameters, r.ParameterSet, true);
125
ArrayDataViewBuilder dvBuilder = new ArrayDataViewBuilder(
_host
);
130
_host
.Assert(view.GetRowCount() == targets.Length, "This data view will have as many rows as there have been evaluations");
132
using (IChannel ch =
_host
.Start("Single training"))
136
var trainer = new FastForestRegressionTrainer(
_host
,
211
_host
.Assert(randomConfigs.Length == randomEIs.Length);
258
throw
_host
.Except(e, "SMAC sweeper localSearch threw exception");
271
SweeperProbabilityUtils spu = new SweeperProbabilityUtils(
_host
);
281
_host
.AssertValue(pset);
287
float[] neighbor = SweeperProbabilityUtils.ParameterSetAsFloatArray(
_host
, _sweepParameters, parent, false);
299
_host
.Assert(hotIndex >= 0);
305
neighbors.Add(SweeperProbabilityUtils.FloatArrayAsParameterSet(
_host
, _sweepParameters, neighbor, false));
310
_host
.Check(parameterNumeric != null, "SMAC sweeper can only sweep over discrete and numeric parameters");
315
float[] neigh = SweeperProbabilityUtils.ParameterSetAsFloatArray(
_host
, _sweepParameters, parent, false);
320
ParameterSet neighbor = SweeperProbabilityUtils.FloatArrayAsParameterSet(
_host
, _sweepParameters, neigh, false);
343
float[] transformedParams = SweeperProbabilityUtils.ParameterSetAsFloatArray(
_host
, _sweepParameters, config, true);
439
_host
.Assert(parameterSet.Count == _sweepParameters.Length);
440
_host
.Assert(index >= 0 && index <= _sweepParameters.Length);
444
_host
.AssertValue(pset);
458
_host
.Assert(hotIndex >= 0);
465
_host
.Check(parameterNumeric != null, "SMAC sweeper can only sweep over discrete and numeric parameters");