Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 13121
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Algorithms.DataAnalysis merged: 13121
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/GaussianProcessRegressionSolutionLineChartView.cs
r12009 r13145 70 70 var mean = Content.EstimatedTrainingValues.ToArray(); 71 71 var s2 = Content.EstimatedTrainingVariance.ToArray(); 72 var lower = mean.Zip(s2, (m, s) => m - 1.96 * Math.Sqrt(s)).ToArray();73 var upper = mean.Zip(s2, (m, s) => m + 1.96 * Math.Sqrt(s)).ToArray();72 var lower = mean.Zip(s2, GetLowerConfBound).ToArray(); 73 var upper = mean.Zip(s2, GetUpperConfBound).ToArray(); 74 74 this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TrainingIndices.ToArray(), lower, upper); 75 75 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME]); … … 83 83 mean = Content.EstimatedTestValues.ToArray(); 84 84 s2 = Content.EstimatedTestVariance.ToArray(); 85 lower = mean.Zip(s2, (m, s) => m - 1.96 * Math.Sqrt(s)).ToArray();86 upper = mean.Zip(s2, (m, s) => m + 1.96 * Math.Sqrt(s)).ToArray();85 lower = mean.Zip(s2, GetLowerConfBound).ToArray(); 86 upper = mean.Zip(s2, GetUpperConfBound).ToArray(); 87 87 this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TestIndices.ToArray(), lower, upper); 88 88 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME]); … … 93 93 mean = Content.EstimatedValues.ToArray(); 94 94 s2 = Content.EstimatedVariance.ToArray(); 95 lower = mean.Zip(s2, (m, s) => m - 1.96 * Math.Sqrt(s)).ToArray();96 upper = mean.Zip(s2, (m, s) => m + 1.96 * Math.Sqrt(s)).ToArray();95 lower = mean.Zip(s2, GetLowerConfBound).ToArray(); 96 upper = mean.Zip(s2, GetUpperConfBound).ToArray(); 97 97 List<double> allLower = allIndices.Select(index => lower[index]).ToList(); 98 98 List<double> allUpper = allIndices.Select(index => upper[index]).ToList(); … … 265 265 mean = Content.EstimatedValues.ToArray(); 266 266 s2 = Content.EstimatedVariance.ToArray(); 267 lower = mean.Zip(s2, (m, s) => m - 1.96 * Math.Sqrt(s)).ToArray();268 upper = mean.Zip(s2, (m, s) => m + 1.96 * Math.Sqrt(s)).ToArray();267 lower = mean.Zip(s2, GetLowerConfBound).ToArray(); 268 upper = mean.Zip(s2, GetUpperConfBound).ToArray(); 269 269 lower = indices.Select(index => lower[index]).ToArray(); 270 270 upper = indices.Select(index => upper[index]).ToArray(); … … 274 274 mean = Content.EstimatedTrainingValues.ToArray(); 275 275 s2 = Content.EstimatedTrainingVariance.ToArray(); 276 lower = mean.Zip(s2, (m, s) => m - 1.96 * Math.Sqrt(s)).ToArray();277 upper = mean.Zip(s2, (m, s) => m + 1.96 * Math.Sqrt(s)).ToArray();276 lower = mean.Zip(s2, GetLowerConfBound).ToArray(); 277 upper = mean.Zip(s2, GetUpperConfBound).ToArray(); 278 278 break; 279 279 case ESTIMATEDVALUES_TEST_SERIES_NAME: … … 281 281 mean = Content.EstimatedTestValues.ToArray(); 282 282 s2 = Content.EstimatedTestVariance.ToArray(); 283 lower = mean.Zip(s2, (m, s) => m - 1.96 * Math.Sqrt(s)).ToArray();284 upper = mean.Zip(s2, (m, s) => m + 1.96 * Math.Sqrt(s)).ToArray();283 lower = mean.Zip(s2, GetLowerConfBound).ToArray(); 284 upper = mean.Zip(s2, GetUpperConfBound).ToArray(); 285 285 break; 286 286 } … … 295 295 } 296 296 297 private double GetLowerConfBound(double m, double s) { 298 return m - 1.96 * Math.Sqrt(s); 299 } 300 301 302 private double GetUpperConfBound(double m, double s) { 303 return m + 1.96 * Math.Sqrt(s); 304 } 305 297 306 // workaround as per http://stackoverflow.com/questions/5744930/datapointcollection-clear-performance 298 307 private static void ClearPointsQuick(DataPointCollection points) { -
stable/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessModel.cs
r13052 r13145 355 355 for (int i = 0; i < newN; i++) { 356 356 var sumV = Util.ScalarProd(Util.GetCol(sWKs, i), Util.GetCol(sWKs, i)); 357 kss[i] += sqrSigmaNoise; // kss is V(f), add noise variance of predictive distibution to get V(y) 357 358 kss[i] -= sumV; 358 359 if (kss[i] < 0) kss[i] = 0;
Note: See TracChangeset
for help on using the changeset viewer.