Changeset 10757 for branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning/BestSolutionAnalyzer.cs
- Timestamp:
- 04/17/14 15:34:25 (10 years ago)
- Location:
- branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning
- Property svn:ignore
-
old new 2 2 obj 3 3 bin 4 Plugin.cs
-
- Property svn:ignore
-
branches/HeuristicLab.Problems.GaussianProcessTuning/HeuristicLab.Problems.GaussianProcessTuning/BestSolutionAnalyzer.cs
r8753 r10757 17 17 private const string QualityParameterName = "Quality"; 18 18 private const string SymbolicExpressionTreeParameterName = "GaussianProcessConfiguration"; 19 private const string BestSolutionParameterName = "Best solution";20 19 private const string ResultsParameterName = "Results"; 21 20 private const string ProblemDataParameterName = "ProblemData"; 22 21 private const string InterpreterParameterName = "Interpreter"; 23 22 private const string SolutionParameterName = "Solution"; 23 private const string TreeParameterName = "Covariance function"; 24 24 25 25 public IScopeTreeLookupParameter<DoubleValue> QualityParameter { … … 31 31 public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { 32 32 get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; } 33 }34 public ILookupParameter<Solution> BestSolutionParameter {35 get { return (ILookupParameter<Solution>)Parameters[BestSolutionParameterName]; }36 33 } 37 34 public ILookupParameter<ResultCollection> ResultParameter { … … 55 52 Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The Gaussian process configuration to evaluate represented as symbolic expression tree.")); 56 53 Parameters.Add(new ScopeTreeLookupParameter<IGaussianProcessSolution>(SolutionParameterName, "The solution of the Gaussian process algorithm.")); 57 Parameters.Add(new LookupParameter<Solution>(BestSolutionParameterName, "The best Gaussian process configuration."));58 54 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The result collection of the algorithm.")); 59 55 Parameters.Add(new LookupParameter<IRegressionProblemData>(ProblemDataParameterName, "")); … … 85 81 } 86 82 var cloner = new Cloner(); 87 var problemData = cloner.Clone(ProblemDataParameter.ActualValue);88 var interpreter = cloner.Clone(InterpreterParameter.ActualValue);89 83 bestTree = cloner.Clone(bestTree); 90 var bestModel = new GaussianProcessRegressionModel(bestTree, problemData, interpreter);91 var bestSolutionConfiguration = new Solution(bestModel, problemData);92 93 BestSolutionParameter.ActualValue = bestSolutionConfiguration;94 84 95 85 var resultCollection = ResultParameter.ActualValue; 96 if (!resultCollection.ContainsKey(BestSolutionParameterName)) { 97 resultCollection.Add(new Result(BestSolutionParameterName, "The best Gaussian process solution", bestSolutionConfiguration)); 86 if (!resultCollection.ContainsKey(SolutionParameterName)) { 98 87 resultCollection.Add(new Result(SolutionParameterName, "The Gaussian process algorithm solution", bestSolution)); 88 resultCollection.Add(new Result(TreeParameterName, "The best covariance function", bestTree)); 99 89 } else { 100 resultCollection[BestSolutionParameterName].Value = bestSolutionConfiguration;101 90 resultCollection[SolutionParameterName].Value = bestSolution; 91 resultCollection[TreeParameterName].Value = bestTree; 102 92 } 103 93
Note: See TracChangeset
for help on using the changeset viewer.