Changeset 5759 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective
- Timestamp:
- 03/19/11 02:22:45 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
r5747 r5759 26 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using System;29 28 30 29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { … … 47 46 public override Core.IOperation Apply() { 48 47 IEnumerable<int> rows = GenerateRowsToEvaluate(); 49 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimit .Value, UpperEstimationLimit.Value, ProblemData, rows);48 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows); 50 49 QualitiesParameter.ActualValue = new DoubleArray(qualities); 51 50 return base.Apply(); … … 65 64 UpperEstimationLimitParameter.ExecutionContext = context; 66 65 67 double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreter , tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);66 double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows); 68 67 69 68 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r5747 r5759 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; … … 26 27 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using System;29 29 30 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { … … 47 47 public override IOperation Apply() { 48 48 IEnumerable<int> rows = GenerateRowsToEvaluate(); 49 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimit .Value, UpperEstimationLimit.Value, ProblemData, rows);49 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows); 50 50 QualitiesParameter.ActualValue = new DoubleArray(qualities); 51 51 return base.Apply(); … … 70 70 UpperEstimationLimitParameter.ExecutionContext = context; 71 71 72 double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreter , tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);72 double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows); 73 73 74 74 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs
r5742 r5759 72 72 InitializeOperators(); 73 73 UpdateEstimationLimits(); 74 UpdateDatasetPartitions();75 74 } 76 75 … … 82 81 83 82 private void UpdateEstimationLimits() { 84 if (ProblemData.TrainingPartition Start.Value < ProblemData.TrainingPartitionEnd.Value) {85 var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition Start.Value, ProblemData.TrainingPartitionEnd.Value);83 if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) { 84 var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End); 86 85 var mean = targetValues.Average(); 87 86 var range = targetValues.Max() - targetValues.Min(); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer.cs
r5729 r5759 20 20 #endregion 21 21 22 using System.Collections.Generic;23 using System.Linq;24 22 using HeuristicLab.Common; 25 23 using HeuristicLab.Core; 26 24 using HeuristicLab.Data; 27 25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 28 using HeuristicLab.Operators;29 using HeuristicLab.Optimization;30 26 using HeuristicLab.Parameters; 31 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 51 47 get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; } 52 48 } 53 49 public IValueParameter<BoolValue> ApplyLinearScalingParameter { 54 50 get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; } 55 51 } … … 57 53 58 54 #region properties 59 public DoubleValue UpperEstimationLimit {60 get { return UpperEstimationLimitParameter.ActualValue; }61 }62 public DoubleValue LowerEstimationLimit {63 get { return LowerEstimationLimitParameter.ActualValue; }64 }65 55 public BoolValue ApplyLinearScaling { 66 56 get { return ApplyLinearScalingParameter.Value; } … … 81 71 82 72 protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQuality) { 83 var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreter , LowerEstimationLimit.Value, UpperEstimationLimit.Value);84 var solution = new SymbolicRegressionSolution(model, ProblemData );73 var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value); 74 var solution = new SymbolicRegressionSolution(model, ProblemDataParameter.ActualValue); 85 75 if (ApplyLinearScaling.Value) 86 76 solution.ScaleModel();
Note: See TracChangeset
for help on using the changeset viewer.