Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5759


Ignore:
Timestamp:
03/19/11 02:22:45 (12 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
Files:
43 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs

    r5659 r5759  
    271271            clonedAlgorithm.Name = algorithm.Name + " Fold " + i;
    272272            IDataAnalysisProblem problem = clonedAlgorithm.Problem as IDataAnalysisProblem;
    273             problem.ProblemData.TestPartitionEnd.Value = (i + 1) == Folds.Value ? SamplesEnd.Value : (i + 1) * testSamplesCount + SamplesStart.Value;
    274             problem.ProblemData.TestPartitionStart.Value = (i * testSamplesCount) + SamplesStart.Value;
     273            problem.ProblemData.TestPartition.End = (i + 1) == Folds.Value ? SamplesEnd.Value : (i + 1) * testSamplesCount + SamplesStart.Value;
     274            problem.ProblemData.TestPartition.Start = (i * testSamplesCount) + SamplesStart.Value;
    275275            clonedAlgorithms.Add(clonedAlgorithm);
    276276          }
     
    408408    }
    409409    private void SamplesStart_ValueChanged(object sender, EventArgs e) {
    410       if (Problem != null) Problem.ProblemData.TrainingPartitionStart.Value = SamplesStart.Value;
     410      if (Problem != null) Problem.ProblemData.TrainingPartition.Start = SamplesStart.Value;
    411411    }
    412412    private void SamplesEnd_ValueChanged(object sender, EventArgs e) {
    413       if (Problem != null) Problem.ProblemData.TrainingPartitionEnd.Value = SamplesEnd.Value;
     413      if (Problem != null) Problem.ProblemData.TrainingPartition.End = SamplesEnd.Value;
    414414    }
    415415
  • branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs

    r5736 r5759  
    7171      string targetVariable = problemData.TargetVariable;
    7272      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    73       int samplesStart = problemData.TrainingPartitionStart.Value;
    74       int samplesEnd = problemData.TrainingPartitionEnd.Value;
     73      int samplesStart = problemData.TrainingPartition.Start;
     74      int samplesEnd = problemData.TrainingPartition.End;
    7575      IEnumerable<int> rows = Enumerable.Range(samplesStart, samplesEnd - samplesStart);
    7676      int nClasses = problemData.ClassNames.Count();
  • branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs

    r5733 r5759  
    7373      string targetVariable = problemData.TargetVariable;
    7474      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    75       int samplesStart = problemData.TrainingPartitionStart.Value;
    76       int samplesEnd = problemData.TrainingPartitionEnd.Value;
     75      int samplesStart = problemData.TrainingPartition.Start;
     76      int samplesEnd = problemData.TrainingPartition.End;
    7777      IEnumerable<int> rows = Enumerable.Range(samplesStart, samplesEnd - samplesStart);
    7878      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
  • branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs

    r5690 r5759  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    2425using HeuristicLab.Common;
     
    2930using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3031using HeuristicLab.Problems.DataAnalysis;
    31 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    32 using System.Collections.Generic;
    33 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    3432
    3533namespace HeuristicLab.Algorithms.DataAnalysis {
     
    124122      Dataset dataset = problemData.Dataset;
    125123      string targetVariable = problemData.TargetVariable;
    126       int start = problemData.TrainingPartitionStart.Value;
    127       int end = problemData.TrainingPartitionEnd.Value;
     124      int start = problemData.TrainingPartition.Start;
     125      int end = problemData.TrainingPartition.End;
    128126      IEnumerable<int> rows = Enumerable.Range(start, end - start);
    129127
  • branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs

    r5649 r5759  
    132132      Dataset dataset = problemData.Dataset;
    133133      string targetVariable = problemData.TargetVariable;
    134       int start = problemData.TrainingPartitionStart.Value;
    135       int end = problemData.TrainingPartitionEnd.Value;
     134      int start = problemData.TrainingPartition.Start;
     135      int end = problemData.TrainingPartition.End;
    136136      IEnumerable<int> rows = Enumerable.Range(start, end - start);
    137137
  • branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClustering.cs

    r5658 r5759  
    8888      Dataset dataset = problemData.Dataset;
    8989      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
    90       int start = problemData.TrainingPartitionStart.Value;
    91       int end = problemData.TrainingPartitionEnd.Value;
     90      int start = problemData.TrainingPartition.Start;
     91      int end = problemData.TrainingPartition.End;
    9292      IEnumerable<int> rows = Enumerable.Range(start, end - start);
    9393      int info;
  • branches/DataAnalysis Refactoring/HeuristicLab.Data.Views/3.3/StringConvertibleValueTupleView.cs

    r5757 r5759  
    4848    protected override void OnContentChanged() {
    4949      base.OnContentChanged();
    50       Item1View.Content = Content.Item1;
    51       Item2View.Content = Content.Item2;
     50      if (Content != null) {
     51        Item1View.Content = Content.Item1;
     52        Item2View.Content = Content.Item2;
     53      } else {
     54        Item1View.Content = null;
     55        Item2View.Content = null;
     56      }
    5257    }
    5358
  • branches/DataAnalysis Refactoring/HeuristicLab.Data/3.3/DoubleRange.cs

    r5757 r5759  
    3030  public class DoubleRange : StringConvertibleValueTuple<DoubleValue, DoubleValue> {
    3131
    32     public DoubleValue Start { get { return Item1; } }
    33     public DoubleValue End { get { return Item2; } }
     32    public double Start {
     33      get { return Item1.Value; }
     34      set { Item1.Value = value; }
     35    }
     36    public double End {
     37      get { return Item2.Value; }
     38      set { Item2.Value = value; }
     39    }
    3440
    3541    [StorableConstructor]
     
    4248    }
    4349
    44     public DoubleRange() : base() { }
     50    public DoubleRange() : base(new DoubleValue(), new DoubleValue()) { }
    4551    public DoubleRange(DoubleValue start, DoubleValue end) : base(start, end) { }
     52    public DoubleRange(double start, double end) : base(new DoubleValue(start), new DoubleValue(end)) { }
    4653
    4754    public override string ToString() {
     
    5158    public override StringConvertibleValueTuple<DoubleValue, DoubleValue> AsReadOnly() {
    5259      var readOnly = new DoubleRange();
    53       readOnly.values = Tuple.Create<DoubleValue, DoubleValue>((DoubleValue)Start.AsReadOnly(), (DoubleValue)End.AsReadOnly());
     60      readOnly.values = Tuple.Create<DoubleValue, DoubleValue>((DoubleValue)Item1.AsReadOnly(), (DoubleValue)Item2.AsReadOnly());
    5461      readOnly.readOnly = true;
    5562      return readOnly;
  • branches/DataAnalysis Refactoring/HeuristicLab.Data/3.3/IntRange.cs

    r5757 r5759  
    3030  public class IntRange : StringConvertibleValueTuple<IntValue, IntValue> {
    3131
    32     public IntValue Start { get { return Item1; } }
    33     public IntValue End { get { return Item2; } }
     32    public int Start {
     33      get { return Item1.Value; }
     34      set { Item1.Value = value; }
     35    }
     36    public int End {
     37      get { return Item2.Value; }
     38      set { Item2.Value = value; }
     39    }
    3440
    3541    [StorableConstructor]
     
    4248    }
    4349
    44     public IntRange() : base() { }
     50    public IntRange() : base(new IntValue(), new IntValue()) { }
    4551    public IntRange(IntValue start, IntValue end) : base(start, end) { }
     52    public IntRange(int start, int end) : base(new IntValue(start), new IntValue(end)) { }
    4653
    4754    public override string ToString() {
     
    5158    public override StringConvertibleValueTuple<IntValue, IntValue> AsReadOnly() {
    5259      var readOnly = new IntRange();
    53       readOnly.values = Tuple.Create<IntValue, IntValue>((IntValue)Start.AsReadOnly(), (IntValue)End.AsReadOnly());
     60      readOnly.values = Tuple.Create<IntValue, IntValue>((IntValue)Item1.AsReadOnly(), (IntValue)Item2.AsReadOnly());
    5461      readOnly.readOnly = true;
    5562      return readOnly;
  • branches/DataAnalysis Refactoring/HeuristicLab.Data/3.3/StringConvertibleValueTuple.cs

    r5757 r5759  
    5555    }
    5656
    57     public StringConvertibleValueTuple()
    58       : base() {
    59       values = Tuple.Create<T, U>(default(T), default(U));
    60       readOnly = false;
    61       RegisterEventHandler();
    62     }
    6357    public StringConvertibleValueTuple(T item1, U item2)
    6458      : base() {
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/AllArchitectureAlteringOperatorsTest.cs

    r5733 r5759  
    3232  public class AllArchitectureAlteringOperatorsTest {
    3333    private const int POPULATION_SIZE = 1000;
    34     private const int N_ITERATIONS = 20;
     34    private const int N_ITERATIONS = 100;
    3535    private const int MAX_TREE_LENGTH = 100;
    3636    private const int MAX_TREE_DEPTH = 10;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs

    r5747 r5759  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System;
    2928
    3029namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     
    4746    public override 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.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs

    r5747 r5759  
    1 using System.Collections.Generic;
     1using System;
     2using System.Collections.Generic;
    23using HeuristicLab.Common;
    34using HeuristicLab.Core;
     
    56using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    67using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    7 using System;
    88
    99namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     
    2626    public override IOperation Apply() {
    2727      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);
    2929      QualitiesParameter.ActualValue = new DoubleArray(qualities);
    3030      return base.Apply();
     
    4949      UpperEstimationLimitParameter.ExecutionContext = context;
    5050
    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);
    5252
    5353      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs

    r5733 r5759  
    7171      InitializeOperators();
    7272      UpdateEstimationLimits();
    73       UpdateDatasetPartitions();
    7473    }
    7574
     
    8180
    8281    private void UpdateEstimationLimits() {
    83       if (ProblemData.TrainingPartitionStart.Value < ProblemData.TrainingPartitionEnd.Value) {
    84         var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartitionStart.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);
    8584        var mean = targetValues.Average();
    8685        var range = targetValues.Max() - targetValues.Min();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs

    r5736 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;
     
    4743      get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    4844    }
    49 
    5045    public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    5146      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
     
    5752
    5853    #region properties
    59     public DoubleValue UpperEstimationLimit {
    60       get { return UpperEstimationLimitParameter.ActualValue; }
    61     }
    62     public DoubleValue LowerEstimationLimit {
    63       get { return LowerEstimationLimitParameter.ActualValue; }
    64     }
    6554    public BoolValue ApplyLinearScaling {
    6655      get { return ApplyLinearScalingParameter.Value; }
     
    8170
    8271    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);
    8574      if (ApplyLinearScaling.Value) {
    8675        solution.ScaleModel();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs

    r5747 r5759  
    4747    public override IOperation Apply() {
    4848      IEnumerable<int> rows = GenerateRowsToEvaluate();
    49       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimit.Value, UpperEstimationLimit.Value, ProblemData, rows);
     49      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
    5050      QualityParameter.ActualValue = new DoubleValue(quality);
    5151      return base.Apply();
     
    8888
    8989    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IClassificationProblemData problemData, IEnumerable<int> rows) {
    90       return Calculate(SymbolicDataAnalysisTreeInterpreter, tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);
     90      return Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
    9191    }
    9292  }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs

    r5747 r5759  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System;
    2928
    3029namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     
    4746    public override IOperation Apply() {
    4847      IEnumerable<int> rows = GenerateRowsToEvaluate();
    49       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimit.Value, UpperEstimationLimit.Value, ProblemData, rows);
     48      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
    5049      QualityParameter.ActualValue = new DoubleValue(quality);
    5150      return base.Apply();
     
    6463      UpperEstimationLimitParameter.ExecutionContext = context;
    6564
    66       double mse = Calculate(SymbolicDataAnalysisTreeInterpreter, tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);
     65      double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
    6766
    6867      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs

    r5747 r5759  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    2322using System.Linq;
    2423using HeuristicLab.Analysis;
     
    2625using HeuristicLab.Core;
    2726using HeuristicLab.Data;
    28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    29 using HeuristicLab.Operators;
    3027using HeuristicLab.Optimization;
    3128using HeuristicLab.Parameters;
    3229using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    33 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    34 using System;
    3530
    3631namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     
    8176      double[] trainingQuality = QualityParameter.ActualValue.Select(x => x.Value).ToArray();
    8277      // evaluate on validation partition
    83       int start = ValidationSamplesStart.Value;
    84       int end = ValidationSamplesEnd.Value;
     78      int start = ValidationPartitionParameter.ActualValue.Start;
     79      int end = ValidationPartitionParameter.ActualValue.End;
    8580      var rows = Enumerable.Range(start, end - start);
    86       IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(Evaluator);
     81      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(EvaluatorParameter.ActualValue);
    8782      double[] validationQuality = (from tree in SymbolicExpressionTrees
    88                                     select Evaluator.Evaluate(childContext, tree, ProblemData, rows))
     83                                    select EvaluatorParameter.ActualValue.Evaluate(childContext, tree, ProblemDataParameter.ActualValue, rows))
    8984                                   .ToArray();
    9085      double r = alglib.spearmancorr2(trainingQuality, validationQuality);
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.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.Classification {
     
    4747    public override IOperation Apply() {
    4848      IEnumerable<int> rows = GenerateRowsToEvaluate();
    49       double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimit.Value, UpperEstimationLimit.Value, ProblemData, rows);
     49      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
    5050      QualityParameter.ActualValue = new DoubleValue(quality);
    5151      return base.Apply();
     
    6969      UpperEstimationLimitParameter.ExecutionContext = context;
    7070
    71       double r2 = Calculate(SymbolicDataAnalysisTreeInterpreter, tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);
     71      double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
    7272
    7373      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r5747 r5759  
    7070      InitializeOperators();
    7171      UpdateEstimationLimits();
    72       UpdateDatasetPartitions();
    7372    }
    7473
     
    8180
    8281    private void UpdateEstimationLimits() {
    83       if (ProblemData.TrainingPartitionStart.Value < ProblemData.TrainingPartitionEnd.Value) {
    84         var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartitionStart.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);
    8584        var mean = targetValues.Average();
    8685        var range = targetValues.Max() - targetValues.Min();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer.cs

    r5736 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;
     
    4743      get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
    4844    }
    49 
    5045    public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
    5146      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
    5247    }
    53 
    5448    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
    5549      get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
     
    5852
    5953    #region properties
    60     public DoubleValue UpperEstimationLimit {
    61       get { return UpperEstimationLimitParameter.ActualValue; }
    62     }
    63     public DoubleValue LowerEstimationLimit {
    64       get { return LowerEstimationLimitParameter.ActualValue; }
    65     }
    6654    public BoolValue ApplyLinearScaling {
    6755      get { return ApplyLinearScalingParameter.Value; }
     
    8270
    8371    protected override ISymbolicClassificationSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
    84       var model = new SymbolicDiscriminantFunctionClassificationModel(bestTree, SymbolicDataAnalysisTreeInterpreter, LowerEstimationLimit.Value, UpperEstimationLimit.Value);
    85       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);
    8674      if (ApplyLinearScaling.Value) {
    8775        solution.ScaleModel();
  • 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();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.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 IOperation Apply() {
    4847      IEnumerable<int> rows = GenerateRowsToEvaluate();
    49       double quality = Calculate(SymbolicDataAnalysisTreeInterpreter, SymbolicExpressionTree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, ProblemData, rows);
     48      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
    5049      Quality = new DoubleValue(quality);
    5150      return base.Apply();
     
    6463      UpperEstimationLimitParameter.ExecutionContext = context;
    6564
    66       double mse = Calculate(SymbolicDataAnalysisTreeInterpreter, tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);
     65      double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
    6766
    6867      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs

    r5747 r5759  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    2322using System.Linq;
    2423using HeuristicLab.Analysis;
     
    2625using HeuristicLab.Core;
    2726using HeuristicLab.Data;
    28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    29 using HeuristicLab.Operators;
    3027using HeuristicLab.Optimization;
    3128using HeuristicLab.Parameters;
    3229using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    33 using HeuristicLab.Problems.DataAnalysis.Symbolic;
    34 using System;
    3530
    3631namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
     
    8176      double[] trainingQuality = QualityParameter.ActualValue.Select(x => x.Value).ToArray();
    8277      // evaluate on validation partition
    83       int start = ValidationSamplesStart.Value;
    84       int end = ValidationSamplesEnd.Value;
     78      int start = ValidationPartitionParameter.ActualValue.Start;
     79      int end = ValidationPartitionParameter.ActualValue.End;
    8580      var rows = Enumerable.Range(start, end - start);
    86       IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(Evaluator);
     81      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(EvaluatorParameter.ActualValue);
    8782      double[] validationQuality = (from tree in SymbolicExpressionTrees
    88                                     select Evaluator.Evaluate(childContext, tree, ProblemData, rows))
     83                                    select EvaluatorParameter.ActualValue.Evaluate(childContext, tree, ProblemDataParameter.ActualValue, rows))
    8984                                   .ToArray();
    9085      double r = alglib.spearmancorr2(trainingQuality, validationQuality);
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.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.Linq;
    29 using System;
    3029
    3130namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
     
    4847    public override IOperation Apply() {
    4948      IEnumerable<int> rows = GenerateRowsToEvaluate();
    50       double quality = Calculate(SymbolicDataAnalysisTreeInterpreter, SymbolicExpressionTree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, ProblemData, rows);
     49      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, SymbolicExpressionTreeParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, ProblemDataParameter.ActualValue, rows);
    5150      Quality = new DoubleValue(quality);
    5251      return base.Apply();
     
    7069      UpperEstimationLimitParameter.ExecutionContext = context;
    7170
    72       double r2 = Calculate(SymbolicDataAnalysisTreeInterpreter, tree, LowerEstimationLimit.Value, UpperEstimationLimit.Value, problemData, rows);
     71      double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value, problemData, rows);
    7372
    7473      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs

    r5747 r5759  
    3131  [StorableClass]
    3232  [Creatable("Problems")]
    33   public class SymbolicRegressionSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IRegressionProblemData, ISymbolicRegressionSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>,IRegressionProblem {
     33  public class SymbolicRegressionSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<IRegressionProblemData, ISymbolicRegressionSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IRegressionProblem {
    3434    private const double PunishmentFactor = 10;
    3535    private const int InitialMaximumTreeDepth = 8;
     
    7272      InitializeOperators();
    7373      UpdateEstimationLimits();
    74       UpdateDatasetPartitions();
    7574    }
    7675
     
    8382
    8483    private void UpdateEstimationLimits() {
    85       if (ProblemData.TrainingPartitionStart.Value < ProblemData.TrainingPartitionEnd.Value) {
    86         var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartitionStart.Value, ProblemData.TrainingPartitionEnd.Value);
     84      if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
     85        var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
    8786        var mean = targetValues.Average();
    8887        var range = targetValues.Max() - targetValues.Min();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveValidationBestSolutionAnalyzer.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;
     
    5046      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
    5147    }
     48    public IValueParameter<BoolValue> ApplyLinearScalingParameter {
     49      get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
     50    }
    5251    #endregion
    5352
    5453    #region properties
    55     public DoubleValue UpperEstimationLimit {
    56       get { return UpperEstimationLimitParameter.ActualValue; }
    57     }
    58     public DoubleValue LowerEstimationLimit {
    59       get { return LowerEstimationLimitParameter.ActualValue; }
    60     }
    61     public IValueParameter<BoolValue> ApplyLinearScalingParameter {
    62       get { return (IValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
    63     }
    6454    public BoolValue ApplyLinearScaling {
    6555      get { return ApplyLinearScalingParameter.Value; }
     
    8272
    8373    protected override ISymbolicRegressionSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
    84       var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreter, LowerEstimationLimit.Value, UpperEstimationLimit.Value);
    85       var solution = new SymbolicRegressionSolution(model, ProblemData);
     74      var model = new SymbolicRegressionModel(bestTree, SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, LowerEstimationLimitParameter.ActualValue.Value, UpperEstimationLimitParameter.ActualValue.Value);
     75      var solution = new SymbolicRegressionSolution(model, ProblemDataParameter.ActualValue);
    8676      if (ApplyLinearScaling.Value)
    8777        solution.ScaleModel();
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationAnalyzer.cs

    r5747 r5759  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Data;
    27 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    2925using HeuristicLab.Parameters;
    3026using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    31 using HeuristicLab.Optimization;
    3227
    3328namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    4338    private const string EvaluatorParameterName = "Evaluator";
    4439    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
    45     private const string ValidationSamplesStartParameterName = "ValidationSamplesStart";
    46     private const string ValidationSamplesEndParameterName = "ValidationSamplesEnd";
     40    private const string ValidationPartitionParameterName = "ValidationPartition";
     41    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
    4742
    4843    #region parameter properties
     
    5651      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
    5752    }
    58     public IValueLookupParameter<IntValue> ValidationSamplesStartParameter {
    59       get { return (IValueLookupParameter<IntValue>)Parameters[ValidationSamplesStartParameterName]; }
     53    public IValueLookupParameter<IntRange> ValidationPartitionParameter {
     54      get { return (IValueLookupParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
    6055    }
    61     public IValueLookupParameter<IntValue> ValidationSamplesEndParameter {
    62       get { return (IValueLookupParameter<IntValue>)Parameters[ValidationSamplesEndParameterName]; }
     56    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
     57      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
    6358    }
    64     #endregion
    65 
    66     #region properties
    67     public U ProblemData { get { return ProblemDataParameter.ActualValue; } }
    68     public T Evaluator { get { return EvaluatorParameter.ActualValue; } }
    69     public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter { get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; } }
    70     public IntValue ValidationSamplesStart { get { return ValidationSamplesStartParameter.ActualValue; } }
    71     public IntValue ValidationSamplesEnd { get { return ValidationSamplesEndParameter.ActualValue; } }
    7259    #endregion
    7360
     
    8269      Parameters.Add(new LookupParameter<T>(EvaluatorParameterName, "The operator to use for fitness evaluation on the validation partition."));
    8370      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter for symbolic data analysis expression trees."));
    84       Parameters.Add(new ValueLookupParameter<IntValue>(ValidationSamplesStartParameterName, "The start index of the validation partition."));
    85       Parameters.Add(new ValueLookupParameter<IntValue>(ValidationSamplesEndParameterName, "The end index of the validation partition."));
     71      Parameters.Add(new ValueLookupParameter<IntRange>(ValidationPartitionParameterName, "Thes validation partition."));
     72      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
    8673    }
    8774  }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs

    r5747 r5759  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
    2324using System.Linq;
     
    2627using HeuristicLab.Data;
    2728using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    2929using HeuristicLab.Optimization;
    3030using HeuristicLab.Parameters;
    3131using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    32 using System;
     32using HeuristicLab.Random;
    3333
    3434namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    7575
    7676    public override IOperation Apply() {
     77      int start = ValidationPartitionParameter.ActualValue.Start;
     78      int end = ValidationPartitionParameter.ActualValue.End;
     79      int count = (int)((end - start) * RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value);
     80      if (count <= 0) return base.Apply();
     81
    7782      var results = ResultCollection;
    7883      // create empty parameter and result values
     
    9499      bool[] maximization = Maximization.ToArray();
    95100      List<double[]> newNonDominatedQualities = new List<double[]>();
    96       var evaluator = Evaluator;
    97       int start = ValidationSamplesStart.Value;
    98       int end = ValidationSamplesEnd.Value;
    99       IEnumerable<int> rows = Enumerable.Range(start, end - start);
     101      var evaluator = EvaluatorParameter.ActualValue;
     102      IEnumerable<int> rows = RandomEnumerable.SampleRandomNumbers(start, end, count);
    100103      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
    101104      for (int i = 0; i < tree.Length; i++) {
    102         qualities.Add(evaluator.Evaluate(childContext, tree[i], ProblemData, rows)); // qualities[i] = ...
     105        qualities.Add(evaluator.Evaluate(childContext, tree[i], ProblemDataParameter.ActualValue, rows)); // qualities[i] = ...
    103106        if (IsNonDominated(qualities[i], trainingBestQualities, maximization) &&
    104107          IsNonDominated(qualities[i], qualities, maximization)) {
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationAnalyzer.cs

    r5747 r5759  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Data;
    27 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    2925using HeuristicLab.Parameters;
    3026using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    31 using HeuristicLab.Optimization;
    3227
    3328namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    4338    private const string EvaluatorParameterName = "Evaluator";
    4439    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
    45     private const string ValidationSamplesStartParameterName = "ValidationSamplesStart";
    46     private const string ValidationSamplesEndParameterName = "ValidationSamplesEnd";
     40    private const string ValidationPartitionParameterName = "ValidationPartition";
     41    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
    4742
    4843    #region parameter properties
     
    5651      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
    5752    }
    58     public IValueLookupParameter<IntValue> ValidationSamplesStartParameter {
    59       get { return (IValueLookupParameter<IntValue>)Parameters[ValidationSamplesStartParameterName]; }
     53    public IValueLookupParameter<IntRange> ValidationPartitionParameter {
     54      get { return (IValueLookupParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
    6055    }
    61     public IValueLookupParameter<IntValue> ValidationSamplesEndParameter {
    62       get { return (IValueLookupParameter<IntValue>)Parameters[ValidationSamplesEndParameterName]; }
     56    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
     57      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
    6358    }
    64     #endregion
    65 
    66     #region properties
    67     public U ProblemData { get { return ProblemDataParameter.ActualValue; } }
    68     public T Evaluator { get { return EvaluatorParameter.ActualValue; } }
    69     public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter { get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; } }
    70     public IntValue ValidationSamplesStart { get { return ValidationSamplesStartParameter.ActualValue; } }
    71     public IntValue ValidationSamplesEnd { get { return ValidationSamplesEndParameter.ActualValue; } }
    7259    #endregion
    7360
     
    8269      Parameters.Add(new LookupParameter<T>(EvaluatorParameterName, "The operator to use for fitness evaluation on the validation partition."));
    8370      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter for symbolic data analysis expression trees."));
    84       Parameters.Add(new ValueLookupParameter<IntValue>(ValidationSamplesStartParameterName, "The start index of the validation partition."));
    85       Parameters.Add(new ValueLookupParameter<IntValue>(ValidationSamplesEndParameterName, "The end index of the validation partition."));
     71      Parameters.Add(new ValueLookupParameter<IntRange>(ValidationPartitionParameterName, "Thes validation partition."));
     72      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
    8673    }
    8774  }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs

    r5747 r5759  
    2626using HeuristicLab.Data;
    2727using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    2928using HeuristicLab.Optimization;
    3029using HeuristicLab.Parameters;
    3130using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HeuristicLab.Random;
    3232
    3333namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    7878      ISymbolicExpressionTree[] tree = SymbolicExpressionTrees.ToArray();
    7979      double[] quality = new double[tree.Length];
    80       var evaluator = Evaluator;
    81       int start = ValidationSamplesStart.Value;
    82       int end = ValidationSamplesEnd.Value;
    83       IEnumerable<int> rows = Enumerable.Range(start, end - start);
     80      var evaluator = EvaluatorParameter.ActualValue;
     81      int start = ValidationPartitionParameter.ActualValue.Start;
     82      int end = ValidationPartitionParameter.ActualValue.End;
     83      int count = (int)((end - start) * RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value);
     84      if (count <= 0) return base.Apply();
     85
     86      IEnumerable<int> rows = RandomEnumerable.SampleRandomNumbers(start, end, count);
    8487      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
    8588      for (int i = 0; i < tree.Length; i++) {
    86         quality[i] = evaluator.Evaluate(childContext, tree[i], ProblemData, rows);
     89        quality[i] = evaluator.Evaluate(childContext, tree[i], ProblemDataParameter.ActualValue, rows);
    8790        if (IsBetter(quality[i], bestQuality, Maximization.Value)) {
    8891          bestQuality = quality[i];
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisEvaluator.cs

    r5720 r5759  
    4343    private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
    4444    private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
    45     private const string SamplesStartParameterName = "SamplesStart";
    46     private const string SamplesEndParameterName = "SamplesEnd";
     45    private const string EvaluationPartitionParameterName = "EvaluationPartition";
    4746    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
    4847
     
    6362    }
    6463
    65     public IFixedValueParameter<IntValue> SamplesStartParameter {
    66       get { return (IFixedValueParameter<IntValue>)Parameters[SamplesStartParameterName]; }
    67     }
    68     public IFixedValueParameter<IntValue> SamplesEndParameter {
    69       get { return (IFixedValueParameter<IntValue>)Parameters[SamplesEndParameterName]; }
     64    public IValueLookupParameter<IntRange> EvaluationPartitionParameter {
     65      get { return (IValueLookupParameter<IntRange>)Parameters[EvaluationPartitionParameterName]; }
    7066    }
    7167
     
    7773    }
    7874
    79     public IFixedValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
    80       get { return (IFixedValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
     75    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
     76      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
    8177    }
    8278    #endregion
    8379
    84     #region properties
    85     public IRandom Random {
    86       get { return RandomParameter.ActualValue; }
    87     }
    88     public ISymbolicExpressionTree SymbolicExpressionTree {
    89       get { return SymbolicExpressionTreeParameter.ActualValue; }
    90     }
    91     public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicDataAnalysisTreeInterpreter {
    92       get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; }
    93     }
    94     public T ProblemData {
    95       get { return ProblemDataParameter.ActualValue; }
    96     }
    97     public IntValue SamplesStart {
    98       get { return SamplesStartParameter.Value; }
    99     }
    100     public IntValue SamplesEnd {
    101       get { return SamplesEndParameter.Value; }
    102     }
    103     public DoubleValue UpperEstimationLimit {
    104       get { return UpperEstimationLimitParameter.ActualValue; }
    105     }
    106     public DoubleValue LowerEstimationLimit {
    107       get { return LowerEstimationLimitParameter.ActualValue; }
    108     }
    109     public PercentValue RelativeNumberOfEvaluatedSamples {
    110       get { return RelativeNumberOfEvaluatedSamplesParameter.Value; }
    111     }
    112     #endregion
    11380
    11481    [StorableConstructor]
     
    12390      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic data analysis solution encoded as a symbolic expression tree."));
    12491      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
    125       Parameters.Add(new FixedValueParameter<IntValue>(SamplesStartParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated.", new IntValue()));
    126       Parameters.Add(new FixedValueParameter<IntValue>(SamplesEndParameterName, "The end index of the dataset partition on which the symbolic data analysis solution should be evaluated.", new IntValue()));
     92      Parameters.Add(new ValueLookupParameter<IntRange>(EvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated."));
    12793      Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic data analysis trees."));
    12894      Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
    129       Parameters.Add(new FixedValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index.", new PercentValue(1)));
     95      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
    13096    }
    13197
    13298    protected IEnumerable<int> GenerateRowsToEvaluate() {
    13399      int seed = RandomParameter.ActualValue.Next();
     100      int samplesStart = EvaluationPartitionParameter.ActualValue.Start;
     101      int samplesEnd = EvaluationPartitionParameter.ActualValue.End;
    134102
    135       if (SamplesEnd.Value < SamplesStart.Value) throw new ArgumentException("Start value is larger than end value.");
    136       int count = (int)((SamplesEnd.Value - SamplesStart.Value) * RelativeNumberOfEvaluatedSamples.Value);
     103      if (samplesEnd < samplesStart) throw new ArgumentException("Start value is larger than end value.");
     104      int count = (int)((samplesEnd - samplesStart) * RelativeNumberOfEvaluatedSamplesParameter.ActualValue.Value);
    137105      if (count == 0) count = 1;
    138       return RandomEnumerable.SampleRandomNumbers(seed, SamplesStart.Value, SamplesEnd.Value, count)
    139         .Where(i => i < ProblemDataParameter.ActualValue.TestPartitionStart.Value || ProblemDataParameter.ActualValue.TestPartitionEnd.Value <= i);
     106      return RandomEnumerable.SampleRandomNumbers(seed, samplesEnd, samplesStart, count)
     107        .Where(i => i < ProblemDataParameter.ActualValue.TestPartition.Start || ProblemDataParameter.ActualValue.TestPartition.End <= i);
    140108    }
    141109  }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisEvaluator.cs

    r5618 r5759  
    2727  where T : class,IDataAnalysisProblemData {
    2828    ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
    29     IFixedValueParameter<IntValue> SamplesStartParameter { get; }
    30     IFixedValueParameter<IntValue> SamplesEndParameter { get; }
     29    IValueLookupParameter<IntRange> EvaluationPartitionParameter { get; }
     30    IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
    3131
    3232    IValueLookupParameter<T> ProblemDataParameter { get; }
    33     T ProblemData { get; }
    3433  }
    3534}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisValidationAnalyzer.cs

    r5722 r5759  
    2727    ILookupParameter<U> ProblemDataParameter { get; }
    2828    ILookupParameter<T> EvaluatorParameter { get; }
    29     IValueLookupParameter<IntValue> ValidationSamplesStartParameter { get; }
    30     IValueLookupParameter<IntValue> ValidationSamplesEndParameter { get; }
     29    IValueLookupParameter<IntRange> ValidationPartitionParameter { get; }
     30    IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
    3131  }
    3232}
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs

    r5733 r5759  
    5050    private const string MaximumFunctionDefinitionsParameterName = "MaximumFunctionDefinitions";
    5151    private const string MaximumFunctionArgumentsParameterName = "MaximumFunctionArguments";
    52     private const string RelativeNumberOfEvaluatedSamples = "RelativeNumberOfEvaluatedSamples";
     52    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
    5353    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
    54     private const string ModelSelectionPartitionParamterName = "ModelSelectionPartition";
     54    private const string ModelSelectionPartitionParameterName = "ModelSelectionPartition";
    5555
    5656    private const string ProblemDataParameterDescription = "";
     
    6161    private const string MaximumFunctionDefinitionsParameterDescription = "Maximal number of automatically defined functions";
    6262    private const string MaximumFunctionArgumentsParameterDescription = "Maximal number of arguments of automatically defined functions.";
     63    private const string RelativeNumberOfEvaluatedSamplesParameterDescription = "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation.";
     64    private const string FitnessCalculationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to calculate the fitness of an individual.";
     65    private const string ModelSelectionPartitionParameterDescription = "The partition of the problem data training partition, that should be used the select the best model from (optional).";
    6366    #endregion
    6467
     
    8891      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumFunctionArgumentsParameterName]; }
    8992    }
     93    public IFixedValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
     94      get { return (IFixedValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
     95    }
     96    public IFixedValueParameter<IntRange> FitnessCalculationPartitionParameter {
     97      get { return (IFixedValueParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
     98    }
     99    public IFixedValueParameter<IntRange> ModelSelectionPartitionParamater {
     100      get { return (IFixedValueParameter<IntRange>)Parameters[ModelSelectionPartitionParameterName]; }
     101    }
    90102    #endregion
    91103
     
    122134    public IntValue MaximumFunctionArguments {
    123135      get { return MaximumFunctionArgumentsParameter.Value; }
     136    }
     137    public PercentValue RelativeNumberOfEvaluatedSamples {
     138      get { return RelativeNumberOfEvaluatedSamplesParameter.Value; }
     139    }
     140
     141    public IntRange FitnessCalculationPartition {
     142      get { return FitnessCalculationPartitionParameter.Value; }
     143    }
     144    public IntRange ModelSelectionPartition {
     145      get { return ModelSelectionPartitionParamater.Value; }
    124146    }
    125147    #endregion
     
    145167      Parameters.Add(new FixedValueParameter<IntValue>(MaximumFunctionDefinitionsParameterName, MaximumFunctionDefinitionsParameterDescription, new IntValue()));
    146168      Parameters.Add(new FixedValueParameter<IntValue>(MaximumFunctionArgumentsParameterName, MaximumFunctionArgumentsParameterDescription, new IntValue()));
     169      Parameters.Add(new FixedValueParameter<IntRange>(FitnessCalculationPartitionParameterName, FitnessCalculationPartitionParameterDescription, new IntRange()));
     170      Parameters.Add(new FixedValueParameter<IntRange>(ModelSelectionPartitionParameterName, ModelSelectionPartitionParameterDescription, new IntRange()));
     171      Parameters.Add(new FixedValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, RelativeNumberOfEvaluatedSamplesParameterDescription, new PercentValue(1)));
    147172
    148173      SymbolicExpressionTreeGrammar = new TypeCoherentExpressionGrammar();
     
    152177
    153178      UpdateGrammar();
    154       UpdateDatasetPartitions();
    155179      RegisterEventHandlers();
    156     }
    157 
    158     protected virtual void UpdateDatasetPartitions() {
    159       Evaluator.SamplesStartParameter.Value.Value = ProblemData.TrainingPartitionStart.Value;
    160       Evaluator.SamplesEndParameter.Value.Value = ProblemData.TrainingPartitionEnd.Value;
    161 
    162       foreach (var analyzer in Operators.OfType<ISymbolicDataAnalysisValidationAnalyzer<U, T>>()) {
    163         analyzer.ValidationSamplesStartParameter.Value = new IntValue(ProblemData.TrainingPartitionStart.Value);
    164         analyzer.ValidationSamplesEndParameter.Value = new IntValue(ProblemData.TrainingPartitionEnd.Value);
    165       }
    166180    }
    167181
     
    227241    protected virtual void OnProblemDataChanged() {
    228242      UpdateGrammar();
    229       UpdateDatasetPartitions();
    230243      ParameterizeOperators();
    231244
     
    254267        op.ProblemDataParameter.ActualName = ProblemDataParameterName;
    255268        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    256         op.SamplesStartParameter.Value.Value = ProblemData.TrainingPartitionStart.Value;
    257         op.SamplesEndParameter.Value.Value = ProblemData.TrainingPartitionEnd.Value;
     269        op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;
     270        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
    258271      }
    259272      foreach (var op in operators.OfType<ISymbolicExpressionTreeCrossover>()) {
     
    267280        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    268281      }
     282      foreach (var op in operators.OfType<ISymbolicDataAnalysisValidationAnalyzer<U, T>>()) {
     283        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
     284        op.ValidationPartitionParameter.ActualName = ModelSelectionPartitionParamater.Name;
     285      }
    269286      foreach (var op in operators.OfType<ISymbolicDataAnalysisInterpreterOperator>()) {
    270287        op.SymbolicDataAnalysisTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameterName;
    271       }
    272       foreach (var op in operators.OfType<ISymbolicDataAnalysisAnalyzer>()) {
    273         op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
    274288      }
    275289    }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs

    r5663 r5759  
    136136      this.chart.ChartAreas[0].AxisX.StripLines.Clear();
    137137      this.CreateAndAddStripLine("Training", Color.FromArgb(20, Color.Green),
    138         Content.ProblemData.TrainingPartitionStart.Value,
    139         Content.ProblemData.TrainingPartitionEnd.Value);
     138        Content.ProblemData.TrainingPartition.Start,
     139        Content.ProblemData.TrainingPartition.End);
    140140      this.CreateAndAddStripLine("Test", Color.FromArgb(20, Color.Red),
    141         Content.ProblemData.TestPartitionStart.Value,
    142         Content.ProblemData.TestPartitionEnd.Value);
     141        Content.ProblemData.TestPartition.Start,
     142        Content.ProblemData.TestPartition.End);
    143143    }
    144144
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs

    r5730 r5759  
    3535    private const string DatasetParameterName = "Dataset";
    3636    private const string InputVariablesParameterName = "InputVariables";
    37     private const string TrainingPartitionStartParameterName = "TrainingPartitionStart";
    38     private const string TrainingPartitionEndParameterName = "TrainingPartitionEnd";
    39     private const string TestPartitionStartParameterName = "TestPartitionStart";
    40     private const string TestPartitionEndParameterName = "TestPartitionEnd";
     37    private const string TrainingPartitionParameterName = "TrainingPartition";
     38    private const string TestPartitionParameterName = "TestPartition";
    4139
    4240    #region parameter properites
     
    4745      get { return (IFixedValueParameter<ICheckedItemList<StringValue>>)Parameters[InputVariablesParameterName]; }
    4846    }
    49     public IFixedValueParameter<IntValue> TrainingPartitionStartParameter {
    50       get { return (IFixedValueParameter<IntValue>)Parameters[TrainingPartitionStartParameterName]; }
     47    public IFixedValueParameter<IntRange> TrainingPartitionParameter {
     48      get { return (IFixedValueParameter<IntRange>)Parameters[TrainingPartitionParameterName]; }
    5149    }
    52     public IFixedValueParameter<IntValue> TrainingPartitionEndParameter {
    53       get { return (IFixedValueParameter<IntValue>)Parameters[TrainingPartitionEndParameterName]; }
    54     }
    55     public IFixedValueParameter<IntValue> TestPartitionStartParameter {
    56       get { return (IFixedValueParameter<IntValue>)Parameters[TestPartitionStartParameterName]; }
    57     }
    58     public IFixedValueParameter<IntValue> TestPartitionEndParameter {
    59       get { return (IFixedValueParameter<IntValue>)Parameters[TestPartitionEndParameterName]; }
     50    public IFixedValueParameter<IntRange> TestPartitionParameter {
     51      get { return (IFixedValueParameter<IntRange>)Parameters[TestPartitionParameterName]; }
    6052    }
    6153    #endregion
     
    7264    }
    7365
    74     public IntValue TrainingPartitionStart {
    75       get { return TrainingPartitionStartParameter.Value; }
     66    public IntRange TrainingPartition {
     67      get { return TrainingPartitionParameter.Value; }
    7668    }
    77     public IntValue TrainingPartitionEnd {
    78       get { return TrainingPartitionEndParameter.Value; }
    79     }
    80     public IntValue TestPartitionStart {
    81       get { return TestPartitionStartParameter.Value; }
    82     }
    83     public IntValue TestPartitionEnd {
    84       get { return TestPartitionEndParameter.Value; }
     69    public IntRange TestPartition {
     70      get { return TestPartitionParameter.Value; }
    8571    }
    8672
    8773    public IEnumerable<int> TrainingIndizes {
    8874      get {
    89         return Enumerable.Range(TrainingPartitionStart.Value, TrainingPartitionEnd.Value - TrainingPartitionStart.Value)
    90                          .Where(i => i >= 0 && i < Dataset.Rows && (i < TestPartitionStart.Value || TestPartitionEnd.Value <= i));
     75        return Enumerable.Range(TrainingPartition.Start, TrainingPartition.End - TrainingPartition.Start)
     76                         .Where(i => i >= 0 && i < Dataset.Rows && (i < TestPartition.Start || TestPartition.End <= i));
    9177      }
    9278    }
    9379    public IEnumerable<int> TestIndizes {
    9480      get {
    95         return Enumerable.Range(TestPartitionStart.Value, TestPartitionEnd.Value - TestPartitionStart.Value)
     81        return Enumerable.Range(TestPartition.Start, TestPartition.End - TestPartition.Start)
    9682           .Where(i => i >= 0 && i < Dataset.Rows);
    9783      }
     
    121107      Parameters.Add(new FixedValueParameter<Dataset>(DatasetParameterName, "", dataset));
    122108      Parameters.Add(new FixedValueParameter<ICheckedItemList<StringValue>>(InputVariablesParameterName, "", inputVariables.AsReadOnly()));
    123       Parameters.Add(new FixedValueParameter<IntValue>(TrainingPartitionStartParameterName, "", new IntValue(trainingPartitionStart)));
    124       Parameters.Add(new FixedValueParameter<IntValue>(TrainingPartitionEndParameterName, "", new IntValue(trainingPartitionEnd)));
    125       Parameters.Add(new FixedValueParameter<IntValue>(TestPartitionStartParameterName, "", new IntValue(testPartitionStart)));
    126       Parameters.Add(new FixedValueParameter<IntValue>(TestPartitionEndParameterName, "", new IntValue(testPartitionEnd)));
     109      Parameters.Add(new FixedValueParameter<IntRange>(TrainingPartitionParameterName, "", new IntRange(trainingPartitionStart, trainingPartitionEnd)));
     110      Parameters.Add(new FixedValueParameter<IntRange>(TestPartitionParameterName, "", new IntRange(testPartitionStart, testPartitionEnd)));
    127111
    128112      ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false;
     
    133117      DatasetParameter.ValueChanged += new EventHandler(Parameter_ValueChanged);
    134118      InputVariables.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<StringValue>>(InputVariables_CheckedItemsChanged);
    135       TrainingPartitionStart.ValueChanged += new EventHandler(Parameter_ValueChanged);
    136       TrainingPartitionEnd.ValueChanged += new EventHandler(Parameter_ValueChanged);
    137       TestPartitionStart.ValueChanged += new EventHandler(Parameter_ValueChanged);
    138       TestPartitionEnd.ValueChanged += new EventHandler(Parameter_ValueChanged);
     119      TrainingPartition.ValueChanged += new EventHandler(Parameter_ValueChanged);
     120      TestPartition.ValueChanged += new EventHandler(Parameter_ValueChanged);
    139121    }
    140122
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs

    r5649 r5759  
    3131    IEnumerable<string> AllowedInputVariables { get; }
    3232
    33     IntValue TrainingPartitionStart { get; }
    34     IntValue TrainingPartitionEnd { get; }
    35     IntValue TestPartitionStart { get; }
    36     IntValue TestPartitionEnd { get; }
     33    IntRange TrainingPartition { get; }
     34    IntRange TestPartition { get; }
    3735
    3836    IEnumerable<int> TrainingIndizes { get; }
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/OnlineEvaluators/OnlineLinearScalingParameterCalculator.cs

    r5746 r5759  
    7878    /// </summary>
    7979    public void Add(double original, double target) {
    80       // validity of values is checked in mean clculator and covariance calculator
     80      // validity of values is checked in mean calculator and covariance calculator
    8181      targetMeanCalculator.Add(target);
    8282      originalMeanAndVarianceCalculator.Add(original);
  • branches/DataAnalysis Refactoring/HeuristicLab/3.3/Files.txt

    r5750 r5759  
    5959HeuristicLab.Problems.DataAnalysis\3.4:HeuristicLab.Problems.DataAnalysis-3.4.dll
    6060HeuristicLab.Problems.DataAnalysis.Classification\3.3:HeuristicLab.Problems.DataAnalysis.Classification-3.3.dll
    61 HeuristicLab.Problems.DataAnalysis.Classification\3.4:HeuristicLab.Problems.DataAnalysis.Classification-3.4.dll
    6261HeuristicLab.Problems.DataAnalysis.Classification.Views\3.3:HeuristicLab.Problems.DataAnalysis.Classification.Views-3.3.dll
    6362HeuristicLab.Problems.DataAnalysis.Regression\3.3:HeuristicLab.Problems.DataAnalysis.Regression-3.3.dll
Note: See TracChangeset for help on using the changeset viewer.