Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/11 02:22:45 (14 years ago)
Author:
mkommend
Message:

#1418:

  • Worked on IntRange and DoubleRange
  • Updated evaluators, analyzers, problems and problem data to use IntRanges
  • Removed properties to access the value of LookupParameter
  • Corrected files.txt
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  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System;
    2928
    3029namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
     
    4746    public override Core.IOperation Apply() {
    4847      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);
    5049      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    5150      return base.Apply();
     
    6564      UpperEstimationLimitParameter.ExecutionContext = context;
    6665
    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);
    6867
    6968      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r5747 r5759  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    2324using HeuristicLab.Common;
     
    2627using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System;
    2929
    3030namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
     
    4747    public override IOperation Apply() {
    4848      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);
    5050      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    5151      return base.Apply();
     
    7070      UpperEstimationLimitParameter.ExecutionContext = context;
    7171
    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);
    7373
    7474      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs

    r5742 r5759  
    7272      InitializeOperators();
    7373      UpdateEstimationLimits();
    74       UpdateDatasetPartitions();
    7574    }
    7675
     
    8281
    8382    private void UpdateEstimationLimits() {
    84       if (ProblemData.TrainingPartitionStart.Value < ProblemData.TrainingPartitionEnd.Value) {
    85         var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartitionStart.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);
    8685        var mean = targetValues.Average();
    8786        var range = targetValues.Max() - targetValues.Min();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer.cs

    r5729 r5759  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Data;
    2725using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    29 using HeuristicLab.Optimization;
    3026using HeuristicLab.Parameters;
    3127using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    5147      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
    5248    }
    53         public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     49    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
    5450      get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
    5551    }
     
    5753
    5854    #region properties
    59     public DoubleValue UpperEstimationLimit {
    60       get { return UpperEstimationLimitParameter.ActualValue; }
    61     }
    62     public DoubleValue LowerEstimationLimit {
    63       get { return LowerEstimationLimitParameter.ActualValue; }
    64     }
    6555    public BoolValue ApplyLinearScaling {
    6656      get { return ApplyLinearScalingParameter.Value; }
     
    8171
    8272    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);
    8575      if (ApplyLinearScaling.Value)
    8676        solution.ScaleModel();
Note: See TracChangeset for help on using the changeset viewer.