5 instantiations of ParameterSet
Microsoft.ML.AutoML (5)
Sweepers\ISweeper.cs (1)
141
new
ParameterSet
(new Dictionary<string, IParameterValue>(_parameterValues), _hash);
Sweepers\Random.cs (1)
26
return new
ParameterSet
(SweepParameters.Select(sweepParameter => sweepParameter.CreateFromNormalized(AutoMlUtils.Random.Value.NextDouble())));
Sweepers\SweeperProbabilityUtils.cs (1)
164
return new
ParameterSet
(parameters);
TrainerExtensions\TrainerExtensionUtil.cs (2)
205
return new
ParameterSet
(paramVals);
234
return new
ParameterSet
(parameters);
65 references to ParameterSet
Microsoft.ML.AutoML (60)
Experiment\SuggestedPipeline.cs (1)
88
var
hyperParamSet = TrainerExtensionUtil.BuildParameterSet(trainerName, pipelineNode.Properties);
Experiment\SuggestedTrainer.cs (3)
15
public
ParameterSet
HyperParamSet { get; set; }
23
ParameterSet
hyperParamSet = null)
33
public void SetHyperparamValues(
ParameterSet
hyperParamSet)
PipelineSuggesters\PipelineSuggester.cs (1)
213
var
proposedParamSet = sweeper.ProposeSweeps(1, historyToUse.Select(h => h.ToRunResult(isMaximizingMetric))).FirstOrDefault();
Sweepers\ISweeper.cs (8)
24
ParameterSet
[] ProposeSweeps(int maxSweeps, IEnumerable<IRunResult> previousRuns = null);
78
internal sealed class ParameterSet : IEquatable<
ParameterSet
>, IEnumerable<IParameterValue>
133
public bool Equals(
ParameterSet
other)
140
public
ParameterSet
Clone() =>
162
ParameterSet
ParameterSet { get; }
178
private readonly
ParameterSet
_parameterSet;
188
public
ParameterSet
ParameterSet
193
public RunResult(
ParameterSet
parameterSet, Double metricValue, bool isMetricMaximizing)
Sweepers\Random.cs (1)
24
protected override
ParameterSet
CreateParamSet()
Sweepers\SmacSweeper.cs (34)
82
public
ParameterSet
[] ProposeSweeps(int maxSweeps, IEnumerable<IRunResult> previousRuns = null)
151
private
ParameterSet
[] GenerateCandidateConfigurations(int numOfCandidates, IEnumerable<IRunResult> previousRuns, FastForestRegressionModelParameters forest)
154
ParameterSet
[] bestKParamSets = GetKBestConfigurations(previousRuns, _args.LocalSearchParentCount);
157
ParameterSet
[] eiChallengers = GreedyPlusRandomSearch(bestKParamSets, forest, (int)Math.Ceiling(numOfCandidates / 2.0F), previousRuns);
160
ParameterSet
[] randomChallengers = _randomSweeper.ProposeSweeps(numOfCandidates - eiChallengers.Length, previousRuns);
164
ParameterSet
[] configs = new
ParameterSet
[eiChallengers.Length + randomChallengers.Length];
179
private
ParameterSet
[] GreedyPlusRandomSearch(
ParameterSet
[] parents, FastForestRegressionModelParameters forest, int numOfCandidates, IEnumerable<IRunResult> previousRuns)
185
HashSet<Tuple<double,
ParameterSet
>> configurations = new HashSet<Tuple<double,
ParameterSet
>>();
188
foreach (
ParameterSet
c in parents)
190
Tuple<double,
ParameterSet
> bestChildKvp = LocalSearch(c, forest, bestVal, _args.Epsilon, bestRun.IsMetricMaximizing);
195
ParameterSet
[] randomConfigs = _randomSweeper.ProposeSweeps(_args.NumRandomEISearchConfigurations, previousRuns);
200
configurations.Add(new Tuple<double,
ParameterSet
>(randomEIs[i], randomConfigs[i]));
202
IOrderedEnumerable<Tuple<double,
ParameterSet
>> bestConfigurations = configurations.OrderByDescending(x => x.Item1);
204
var retainedConfigs = new HashSet<
ParameterSet
>(bestConfigurations.Select(x => x.Item2));
224
private Tuple<double,
ParameterSet
> LocalSearch(
ParameterSet
parent, FastForestRegressionModelParameters forest, double bestVal, double epsilon, bool isMetricMaximizing)
228
double currentBestEI = EvaluateConfigurationsByEI(forest, bestVal, new
ParameterSet
[] { parent }, isMetricMaximizing)[0];
229
ParameterSet
currentBestConfig = parent;
233
ParameterSet
[] neighborhood = GetOneMutationNeighborhood(currentBestConfig);
245
return new Tuple<double,
ParameterSet
>(currentBestEI, currentBestConfig);
259
private
ParameterSet
[] GetOneMutationNeighborhood(
ParameterSet
parent)
261
List<
ParameterSet
> neighbors = new List<
ParameterSet
>();
311
ParameterSet
neighbor = SweeperProbabilityUtils.FloatArrayAsParameterSet(_sweepParameters, neigh, false);
325
private double[][] GetForestRegressionLeafValues(FastForestRegressionModelParameters forest,
ParameterSet
[] configs)
328
foreach (
ParameterSet
config in configs)
380
private double[] EvaluateConfigurationsByEI(FastForestRegressionModelParameters forest, double bestVal,
ParameterSet
[] configs, bool isMetricMaximizing)
387
private
ParameterSet
[] GetKBestConfigurations(IEnumerable<IRunResult> previousRuns, int k = 10)
405
List<
ParameterSet
> outSet = new List<
ParameterSet
>();
Sweepers\SweeperBase.cs (8)
49
public virtual
ParameterSet
[] ProposeSweeps(int maxSweeps, IEnumerable<IRunResult> previousRuns = null)
51
var prevParamSets = new HashSet<
ParameterSet
>(previousRuns?.Select(r => r.ParameterSet).ToList() ?? new List<
ParameterSet
>());
52
var result = new HashSet<
ParameterSet
>();
55
ParameterSet
paramSet;
71
protected abstract
ParameterSet
CreateParamSet();
73
protected static bool AlreadyGenerated(
ParameterSet
paramSet, ISet<
ParameterSet
> previousRuns)
Sweepers\SweeperProbabilityUtils.cs (2)
65
public static float[] ParameterSetAsFloatArray(IValueGenerator[] sweepParams,
ParameterSet
ps, bool expandCategoricals = true)
125
public static
ParameterSet
FloatArrayAsParameterSet(IValueGenerator[] sweepParams, float[] array, bool expandedCategoricals = true)
TrainerExtensions\TrainerExtensionUtil.cs (2)
193
public static
ParameterSet
BuildParameterSet(TrainerName trainerName, IDictionary<string, object> props)
220
private static
ParameterSet
BuildLightGbmParameterSet(IDictionary<string, object> props)
Microsoft.ML.AutoML.Tests (5)
TrainerExtensionsTests.cs (5)
325
var
binaryParams = TrainerExtensionUtil.BuildParameterSet(TrainerName.LightGbmBinary, props);
326
var
multiParams = TrainerExtensionUtil.BuildParameterSet(TrainerName.LightGbmMulti, props);
327
var
regressionParams = TrainerExtensionUtil.BuildParameterSet(TrainerName.LightGbmRegression, props);
328
var
rankingParams = TrainerExtensionUtil.BuildParameterSet(TrainerName.LightGbmRanking, props);
348
var
sdcaParams = TrainerExtensionUtil.BuildParameterSet(TrainerName.SdcaLogisticRegressionBinary, props);