Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/06/14 20:41:57 (11 years ago)
Author:
sawinkle
Message:

#2109:

  • Implemented PIGEMapper. Due to that, it was necessary to modify the Map method interface to additionally take the bounds and length of the genotype.
  • Corrected and simplified the different mappers. Simplified the SampleArity method of /Mappers/GenotypeToPhenotypeMapper.cs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GrammaticalEvolution/HeuristicLab.Problems.GrammaticalEvolution/Symbolic/GESymbolicRegressionSingleObjectiveEvaluator.cs

    r10280 r10290  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Data;
    2425using HeuristicLab.Parameters;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3435    public const string EvaluatorParameterName = "Evaluator";
    3536    public const string RandomParameterName = "Random";
     37    public const string BoundsParameterName = "Bounds";
     38    public const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
    3639
    3740    public IValueParameter<ISymbolicRegressionSingleObjectiveEvaluator> EvaluatorParameter {
     
    4043    public ILookupParameter<IRandom> RandomParameter {
    4144      get { return (ILookupParameter<IRandom>)Parameters[RandomParameterName]; }
     45    }
     46    public ILookupParameter<IntMatrix> BoundsParameter {
     47      get { return (ILookupParameter<IntMatrix>)Parameters[BoundsParameterName]; }
     48    }
     49    public ILookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
     50      get { return (ILookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
    4251    }
    4352
     
    5362      : base() {
    5463      Parameters.Add(new ValueParameter<ISymbolicRegressionSingleObjectiveEvaluator>(EvaluatorParameterName, "The symbolic regression evaluator that should be used to assess the quality of trees.", new SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator()));
     64      Parameters.Add(new LookupParameter<IntMatrix>(BoundsParameterName, "The integer number range in which the single genomes of a genotype are created."));
     65      Parameters.Add(new LookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "Genotype length."));
    5566    }
    5667
     
    6980      var tree = GenotypeToPhenotypeMapperParameter.ActualValue.Map(
    7081        RandomParameter.ActualValue,
     82        BoundsParameter.ActualValue,
     83        MaximumSymbolicExpressionTreeLengthParameter.ActualValue.Value,
    7184        SymbolicExpressionTreeGrammarParameter.ActualValue,
    7285        genotype
Note: See TracChangeset for help on using the changeset viewer.