Changeset 5759 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective
- Timestamp:
- 03/19/11 02:22:45 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.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.Classification { … … 47 46 public override 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.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
r5747 r5759 1 using System.Collections.Generic; 1 using System; 2 using System.Collections.Generic; 2 3 using HeuristicLab.Common; 3 4 using HeuristicLab.Core; … … 5 6 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 6 7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 7 using System;8 8 9 9 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { … … 26 26 public override IOperation Apply() { 27 27 IEnumerable<int> rows = GenerateRowsToEvaluate(); 28 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimit .Value, UpperEstimationLimit.Value, ProblemData, rows);28 double[] qualities = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows); 29 29 QualitiesParameter.ActualValue = new DoubleArray(qualities); 30 30 return base.Apply(); … … 49 49 UpperEstimationLimitParameter.ExecutionContext = context; 50 50 51 double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreter , tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);51 double[] quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows); 52 52 53 53 SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null; -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs
r5733 r5759 71 71 InitializeOperators(); 72 72 UpdateEstimationLimits(); 73 UpdateDatasetPartitions();74 73 } 75 74 … … 81 80 82 81 private void UpdateEstimationLimits() { 83 if (ProblemData.TrainingPartition Start.Value < ProblemData.TrainingPartitionEnd.Value) {84 var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition Start.Value, ProblemData.TrainingPartitionEnd.Value);82 if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) { 83 var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End); 85 84 var mean = targetValues.Average(); 86 85 var range = targetValues.Max() - targetValues.Min(); -
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs
r5736 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; … … 47 43 get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; } 48 44 } 49 50 45 public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter { 51 46 get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; } … … 57 52 58 53 #region properties 59 public DoubleValue UpperEstimationLimit {60 get { return UpperEstimationLimitParameter.ActualValue; }61 }62 public DoubleValue LowerEstimationLimit {63 get { return LowerEstimationLimitParameter.ActualValue; }64 }65 54 public BoolValue ApplyLinearScaling { 66 55 get { return ApplyLinearScalingParameter.Value; } … … 81 70 82 71 protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double[] bestQualities) { 83 var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreter , LowerEstimationLimit.Value, UpperEstimationLimit.Value);84 var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemData );72 var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value); 73 var solution = new SymbolicDiscriminantFunctionClassificationSolution(model, ProblemDataParameter.ActualValue); 85 74 if (ApplyLinearScaling.Value) { 86 75 solution.ScaleModel();
Note: See TracChangeset
for help on using the changeset viewer.