- Timestamp:
- 07/08/15 09:52:09 (9 years ago)
- Location:
- stable
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 12492,12641
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression merged: 12641
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r12009 r12669 57 57 OnlineCalculatorError errorState; 58 58 59 double r 2;59 double r; 60 60 if (applyLinearScaling) { 61 var r 2Calculator = new OnlinePearsonsRSquaredCalculator();62 CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, r 2Calculator, problemData.Dataset.Rows);63 errorState = r 2Calculator.ErrorState;64 r 2 = r2Calculator.RSquared;61 var rCalculator = new OnlinePearsonsRCalculator(); 62 CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, rCalculator, problemData.Dataset.Rows); 63 errorState = rCalculator.ErrorState; 64 r = rCalculator.R; 65 65 } else { 66 66 IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit); 67 r 2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);67 r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState); 68 68 } 69 69 70 if (errorState != OnlineCalculatorError.None) r 2= double.NaN;71 return new double[2] { r 2, solution.Length };70 if (errorState != OnlineCalculatorError.None) r = double.NaN; 71 return new double[2] { r*r, solution.Length }; 72 72 } 73 73 -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs
r12009 r12669 59 59 OnlineCalculatorError errorState; 60 60 61 double r 2;61 double r; 62 62 if (applyLinearScaling) { 63 var r 2Calculator = new OnlinePearsonsRSquaredCalculator();64 CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, r 2Calculator, problemData.Dataset.Rows);65 errorState = r 2Calculator.ErrorState;66 r 2 = r2Calculator.RSquared;63 var rCalculator = new OnlinePearsonsRCalculator(); 64 CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, rCalculator, problemData.Dataset.Rows); 65 errorState = rCalculator.ErrorState; 66 r = rCalculator.R; 67 67 } else { 68 68 IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit); 69 r 2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);69 r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState); 70 70 } 71 71 if (errorState != OnlineCalculatorError.None) return double.NaN; 72 return r 2;72 return r*r; 73 73 } 74 74 -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPruningOperator.cs
r12009 r12669 60 60 var targetValues = ProblemData.Dataset.GetDoubleValues(regressionProblemData.TargetVariable, trainingIndices); 61 61 OnlineCalculatorError errorState; 62 var quality = OnlinePearsonsR SquaredCalculator.Calculate(targetValues, estimatedValues, out errorState);62 var quality = OnlinePearsonsRCalculator.Calculate(targetValues, estimatedValues, out errorState); 63 63 if (errorState != OnlineCalculatorError.None) return double.NaN; 64 return quality ;64 return quality*quality; 65 65 } 66 66 } -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolutionImpactValuesCalculator.cs
r12009 r12669 66 66 if (double.IsNaN(originalQuality)) { 67 67 var originalValues = regressionModel.GetEstimatedValues(dataset, rows); 68 originalQuality = OnlinePearsonsR SquaredCalculator.Calculate(targetValues, originalValues, out errorState);68 originalQuality = OnlinePearsonsRCalculator.Calculate(targetValues, originalValues, out errorState); 69 69 if (errorState != OnlineCalculatorError.None) originalQuality = 0.0; 70 70 } … … 83 83 84 84 var estimatedValues = tempModel.GetEstimatedValues(dataset, rows); 85 double newQuality = OnlinePearsonsR SquaredCalculator.Calculate(targetValues, estimatedValues, out errorState);85 double newQuality = OnlinePearsonsRCalculator.Calculate(targetValues, estimatedValues, out errorState); 86 86 if (errorState != OnlineCalculatorError.None) newQuality = 0.0; 87 87 88 impactValue = originalQuality - newQuality;88 impactValue = (originalQuality*originalQuality) - (newQuality*newQuality); 89 89 } 90 90 }
Note: See TracChangeset
for help on using the changeset viewer.