Changeset 8585 for branches/HeuristicLab.Mono/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessRegressionSolutionCreator.cs
- Timestamp:
- 09/06/12 09:52:52 (12 years ago)
- Location:
- branches/HeuristicLab.Mono
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Mono
-
branches/HeuristicLab.Mono/HeuristicLab.Algorithms.DataAnalysis
-
branches/HeuristicLab.Mono/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessRegressionSolutionCreator.cs
r8451 r8585 75 75 76 76 public override IOperation Apply() { 77 var m = ModelParameter.ActualValue; 78 var data = ProblemDataParameter.ActualValue; 79 var s = new GaussianProcessRegressionSolution(m, data); 77 if (ModelParameter.ActualValue != null) { 78 var m = (IGaussianProcessModel)ModelParameter.ActualValue.Clone(); 79 var data = (IRegressionProblemData)ProblemDataParameter.ActualValue.Clone(); 80 var s = new GaussianProcessRegressionSolution(m, data); 80 81 81 82 82 SolutionParameter.ActualValue = s; 83 var results = ResultsParameter.ActualValue; 84 if (!results.ContainsKey(SolutionParameterName)) { 85 results.Add(new Result(SolutionParameterName, "The Gaussian process regression solution", s)); 86 results.Add(new Result(TrainingRSquaredResultName, "The Pearson's R² of the Gaussian process solution on the training partition.", new DoubleValue(s.TrainingRSquared))); 87 results.Add(new Result(TestRSquaredResultName, "The Pearson's R² of the Gaussian process solution on the test partition.", new DoubleValue(s.TestRSquared))); 88 } else { 89 results[SolutionParameterName].Value = s; 90 results[TrainingRSquaredResultName].Value = new DoubleValue(s.TrainingRSquared); 91 results[TestRSquaredResultName].Value = new DoubleValue(s.TestRSquared); 83 SolutionParameter.ActualValue = s; 84 var results = ResultsParameter.ActualValue; 85 if (!results.ContainsKey(SolutionParameterName)) { 86 results.Add(new Result(SolutionParameterName, "The Gaussian process regression solution", s)); 87 results.Add(new Result(TrainingRSquaredResultName, 88 "The Pearson's R² of the Gaussian process solution on the training partition.", 89 new DoubleValue(s.TrainingRSquared))); 90 results.Add(new Result(TestRSquaredResultName, 91 "The Pearson's R² of the Gaussian process solution on the test partition.", 92 new DoubleValue(s.TestRSquared))); 93 } else { 94 results[SolutionParameterName].Value = s; 95 results[TrainingRSquaredResultName].Value = new DoubleValue(s.TrainingRSquared); 96 results[TestRSquaredResultName].Value = new DoubleValue(s.TestRSquared); 97 } 92 98 } 93 99 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.