Changeset 14280 for branches/HeuristicLab.OSGAEvaluator/HeuristicLab.OSGAEvaluator/SymbolicRegressionSingleObjectiveOSGAEvaluator.cs
 Timestamp:
 09/14/16 16:56:57 (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/HeuristicLab.OSGAEvaluator/HeuristicLab.OSGAEvaluator/SymbolicRegressionSingleObjectiveOSGAEvaluator.cs
r14279 r14280 206 206 var e = estimatedValues.GetEnumerator(); 207 207 208 #region fixed intervals 208 209 if (UseFixedEvaluationIntervals) { 209 210 double threshold = parentQuality * RelativeParentChildQualityThreshold; … … 289 290 return actualQuality; 290 291 } 292 #endregion 291 293 } else { 292 294 var calculator = new OnlinePearsonsRCalculator(); … … 298 300 // if the quality of the individual still falls below the parent quality, then we can reject it sooner, otherwise as i increases the whole estimated series will be used 299 301 for (int i = 0; i < trainingPartitionSize; i += interval) { 302 calculator.Reset(); 303 // save estimated values into the list (for caching) 300 304 int j = i; 301 305 int end = Math.Min(trainingPartitionSize, i + interval); … … 304 308 j++; 305 309 } 306 307 310 var start = problemData.TrainingPartition.Start; 308 calculator.Reset();309 311 // add (estimated, target) pairs to the calculator 310 for (j = 0; j < end; ++j) 311 calculator.Add(estimated[j], targetValues[j + start]); 312 for (j = 0; j < end; ++j) { 313 var index = j + start; 314 calculator.Add(targetValues[index], estimated[j]); 315 } 312 316 // add (target, target) pairs to the calculator (simulate perfect correlation on the remaining rows) 313 317 for (; j < trainingPartitionSize; ++j) { 314 318 var index = j + start; 315 calculator.Add(targetValues[index], targetValues[index]); 319 var v = targetValues[index]; 320 calculator.Add(v, v); 316 321 } 317 322 var r = calculator.ErrorState == OnlineCalculatorError.None ? calculator.R : double.NaN;
Note: See TracChangeset
for help on using the changeset viewer.