public PipelinePattern(TransformInference.SuggestedTransform[] transforms,
                        RecipeInference.SuggestedRecipe.SuggestedLearner learner,
                        string loaderSettings, IHostEnvironment env, PipelineSweeperRunSummary summary = null)
 {
     // Make sure internal pipeline nodes and sweep params are cloned, not shared.
     // Cloning the transforms and learner rather than assigning outright
     // ensures that this will be the case. Doing this here allows us to not
     // worry about changing hyperparameter values in candidate pipelines
     // possibly overwritting other pipelines.
     Transforms         = transforms.Select(t => t.Clone()).ToArray();
     Learner            = learner.Clone();
     LoaderSettings     = loaderSettings;
     _env               = env;
     PerformanceSummary = summary;
     UniqueId           = Guid.NewGuid();
 }
Esempio n. 2
0
 public static IRunResult ConvertToRunResult(RecipeInference.SuggestedRecipe.SuggestedLearner learner, PipelineSweeperRunSummary rs, bool isMetricMaximizing)
 {
     return(new RunResult(ConvertToParameterSet(learner.PipelineNode.SweepParams, learner), rs.MetricValue, isMetricMaximizing));
 }