- Timestamp:
- 12/19/12 11:16:51 (12 years ago)
- Location:
- branches/RuntimeOptimizer
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RuntimeOptimizer
- Property svn:mergeinfo changed
/trunk/sources merged: 8972-8974,8976,8978-8994,8999-9019,9021-9031,9033-9039,9043,9049,9052,9055-9057,9063,9068,9072,9075-9076
- Property svn:mergeinfo changed
-
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression merged: 8972,8976,8984-8985,9052
- Property svn:mergeinfo changed
-
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionModel.cs
r8584 r9078 24 24 double LowerEstimationLimit { get; } 25 25 double UpperEstimationLimit { get; } 26 27 void Scale(IRegressionProblemData problemData); 26 28 } 27 29 } -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs
r8664 r9078 65 65 protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality) { 66 66 var model = new SymbolicRegressionModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper); 67 if (ApplyLinearScalingParameter.ActualValue.Value) SymbolicRegressionModel.Scale(model, ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariable);67 if (ApplyLinearScalingParameter.ActualValue.Value) model.Scale(ProblemDataParameter.ActualValue); 68 68 return new SymbolicRegressionSolution(model, (IRegressionProblemData)ProblemDataParameter.ActualValue.Clone()); 69 69 } -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer.cs
r8664 r9078 55 55 protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality) { 56 56 var model = new SymbolicRegressionModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper); 57 if (ApplyLinearScalingParameter.ActualValue.Value) SymbolicRegressionModel.Scale(model, ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariable);57 if (ApplyLinearScalingParameter.ActualValue.Value) model.Scale(ProblemDataParameter.ActualValue); 58 58 return new SymbolicRegressionSolution(model, (IRegressionProblemData)ProblemDataParameter.ActualValue.Clone()); 59 59 } -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/ConstantOptimizationAnalyzer.cs
r8893 r9078 67 67 get { 68 68 IResult result; 69 ResultCollection.TryGetValue( "Constant Optimization Improvement", out result);69 ResultCollection.TryGetValue(DataTableNameConstantOptimizationImprovement, out result); 70 70 if (result == null) return null; 71 71 return (DataTable)result.Value; … … 112 112 113 113 public override IOperation Apply() { 114 //code executed forfirst call of analyzer114 //code executed in the first call of analyzer 115 115 if (qualitiesBeforeCoOp == null) { 116 117 116 double[] trainingQuality; 118 117 // sort is ascending and we take the first n% => order so that best solutions are smallest -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs
r8938 r9078 132 132 ApplyLinearScalingParameter.ExecutionContext = context; 133 133 134 // Pearson R² evaluator is used on purpose instead of the const-opt evaluator, 135 // because Evaluate() is used to get the quality of evolved models on 136 // different partitions of the dataset (e.g., best validation model) 134 137 double r2 = SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value); 135 138 … … 230 233 } 231 234 catch (ArithmeticException) { 232 return SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.Calculate(interpreter, tree, lowerEstimationLimit, upperEstimationLimit, problemData, rows, applyLinearScaling);235 return originalQuality; 233 236 } 234 237 catch (alglib.alglibexception) { 235 return SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.Calculate(interpreter, tree, lowerEstimationLimit, upperEstimationLimit, problemData, rows, applyLinearScaling);238 return originalQuality; 236 239 } 237 240 -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer.cs
r8664 r9078 64 64 protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) { 65 65 var model = new SymbolicRegressionModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper); 66 if (ApplyLinearScalingParameter.ActualValue.Value) SymbolicRegressionModel.Scale(model, ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariable);66 if (ApplyLinearScalingParameter.ActualValue.Value) model.Scale(ProblemDataParameter.ActualValue); 67 67 return new SymbolicRegressionSolution(model, (IRegressionProblemData)ProblemDataParameter.ActualValue.Clone()); 68 68 } -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs
r8664 r9078 43 43 protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree) { 44 44 var model = new SymbolicRegressionModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper); 45 if (ApplyLinearScalingParameter.ActualValue.Value) SymbolicRegressionModel.Scale(model, ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariable);45 if (ApplyLinearScalingParameter.ActualValue.Value) model.Scale(ProblemDataParameter.ActualValue); 46 46 return new SymbolicRegressionSolution(model, (IRegressionProblemData)ProblemDataParameter.ActualValue.Clone()); 47 47 } -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveValidationBestSolutionAnalyzer.cs
r8664 r9078 56 56 protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) { 57 57 var model = new SymbolicRegressionModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper); 58 if (ApplyLinearScalingParameter.ActualValue.Value) SymbolicRegressionModel.Scale(model, ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariable);58 if (ApplyLinearScalingParameter.ActualValue.Value) model.Scale(ProblemDataParameter.ActualValue); 59 59 return new SymbolicRegressionSolution(model, (IRegressionProblemData)ProblemDataParameter.ActualValue.Clone()); 60 60 } -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer.cs
r8664 r9078 43 43 protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree) { 44 44 var model = new SymbolicRegressionModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper); 45 if (ApplyLinearScalingParameter.ActualValue.Value) SymbolicRegressionModel.Scale(model, ProblemDataParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariable);45 if (ApplyLinearScalingParameter.ActualValue.Value) model.Scale(ProblemDataParameter.ActualValue); 46 46 return new SymbolicRegressionSolution(model, (IRegressionProblemData)ProblemDataParameter.ActualValue.Clone()); 47 47 } -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs
r8664 r9078 69 69 return CreateRegressionSolution(problemData); 70 70 } 71 72 public void Scale(IRegressionProblemData problemData) { 73 Scale(problemData, problemData.TargetVariable); 74 } 71 75 } 72 76 } -
branches/RuntimeOptimizer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolutionImpactValuesCalculator.cs
r8971 r9078 42 42 OnlineCalculatorError errorState; 43 43 if (double.IsNaN(originalQuality)) { 44 var original ClassValues = regressionModel.GetEstimatedValues(dataset, rows);45 originalQuality = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, original ClassValues, out errorState);44 var originalValues = regressionModel.GetEstimatedValues(dataset, rows); 45 originalQuality = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, originalValues, out errorState); 46 46 if (errorState != OnlineCalculatorError.None) originalQuality = 0.0; 47 47 }
Note: See TracChangeset
for help on using the changeset viewer.