Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/07/19 18:16:54 (6 years ago)
Author:
mkommend
Message:

#2974: Updated CoOp to handle negative R² values approprietly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2974_Constants_Optimization/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/ConstantsOptimizationEvaluator.cs

    r16509 r16514  
    7979      var constantOptimizationRows = GenerateRowsToEvaluate(rowsPercentage);
    8080      quality = ConstantsOptimization.LMConstantsOptimizer.OptimizeConstants(solution, problemData.Dataset, problemData.TargetVariable, constantOptimizationRows, applyLinearScaling, ConstantOptimizationIterations.Value);
    81       if (double.IsNaN(quality) || ConstantOptimizationRowsPercentage.Value != RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value) {
     81      if (quality < 0|| double.IsNaN(quality) || ConstantOptimizationRowsPercentage.Value != RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value) {
    8282        var evaluationRows = GenerateRowsToEvaluate();
    8383        quality = SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.Calculate(interpreter, solution, estimationLimits.Lower, estimationLimits.Upper, problemData, evaluationRows, applyLinearScaling);
Note: See TracChangeset for help on using the changeset viewer.