Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/20/13 20:18:38 (11 years ago)
Author:
sawinkle
Message:

#2109:

  • Renamed all identifiers within the files to include 'GE', where necessary.
  • Changed the namespaces of all files to 'HeuristicLab.Problems.GrammaticalEvolution'.
  • Added the parameters IntegerVector, GenotypeToPhenotype and SymbolicExpressionTreeGrammar to the Evaluator classes, where necessary.
  • Changed the SolutionCreator from ISymbolicDataAnalysisSolutionCreator to IIntegerVectorCreator; changed the Evaluator from ISymbolicDataAnalysisEvaluator<T> to IGESymbolicDataAnalysisEvaluator<T>; the problem data class/interface IDataAnalysisProblemData stays the same.
  • The methods Evaluate() and Calculate() of the specific Evaluators won't change -> the genotype-to-phenotype mapping process is done within the Apply() method.
File:
1 edited

Legend:

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

    r10072 r10073  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Encodings.IntegerVectorEncoding;
    2829using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2930using HeuristicLab.Operators;
     
    3132using HeuristicLab.Parameters;
    3233using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     34using HeuristicLab.Problems.DataAnalysis;
     35using HeuristicLab.Problems.DataAnalysis.Symbolic;
     36using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
    3337using HeuristicLab.Random;
    3438
    35 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     39namespace HeuristicLab.Problems.GrammaticalEvolution {
    3640  [StorableClass]
    37   public abstract class SymbolicDataAnalysisEvaluator<T> : SingleSuccessorOperator,
    38     ISymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator, IStochasticOperator
     41  public abstract class GESymbolicDataAnalysisEvaluator<T> : SingleSuccessorOperator,
     42    IGESymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator, IStochasticOperator
    3943  where T : class, IDataAnalysisProblemData {
    4044    private const string RandomParameterName = "Random";
     
    4246    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
    4347    private const string ProblemDataParameterName = "ProblemData";
     48    private const string IntegerVectorParameterName = "IntegerVector";
     49    private const string GenotypeToPhenotypeMapperParameterName = "GenotypeToPhenotypeMapper";
     50    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
     51
    4452    private const string EstimationLimitsParameterName = "EstimationLimits";
    4553    private const string EvaluationPartitionParameterName = "EvaluationPartition";
     
    6775      get { return (IValueLookupParameter<T>)Parameters[ProblemDataParameterName]; }
    6876    }
     77    public ILookupParameter<IntegerVector> IntegerVectorParameter {
     78      get { return (ILookupParameter<IntegerVector>)Parameters[IntegerVectorParameterName]; }
     79    }
     80    public ILookupParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter {
     81      get { return (ILookupParameter<IGenotypeToPhenotypeMapper>)Parameters[GenotypeToPhenotypeMapperParameterName]; }
     82    }
     83    public IValueLookupParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter {
     84      get { return (IValueLookupParameter<ISymbolicDataAnalysisGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
     85    }
    6986
    7087    public IValueLookupParameter<IntRange> EvaluationPartitionParameter {
     
    87104
    88105    [StorableConstructor]
    89     protected SymbolicDataAnalysisEvaluator(bool deserializing) : base(deserializing) { }
    90     protected SymbolicDataAnalysisEvaluator(SymbolicDataAnalysisEvaluator<T> original, Cloner cloner)
     106    protected GESymbolicDataAnalysisEvaluator(bool deserializing) : base(deserializing) { }
     107    protected GESymbolicDataAnalysisEvaluator(GESymbolicDataAnalysisEvaluator<T> original, Cloner cloner)
    91108      : base(original, cloner) {
    92109    }
    93     public SymbolicDataAnalysisEvaluator()
     110    public GESymbolicDataAnalysisEvaluator()
    94111      : base() {
    95112      Parameters.Add(new ValueLookupParameter<IRandom>(RandomParameterName, "The random generator to use."));
     
    97114      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic data analysis solution encoded as a symbolic expression tree."));
    98115      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
     116      Parameters.Add(new LookupParameter<IntegerVector>(IntegerVectorParameterName, "The symbolic data analysis solution encoded as an integer vector genome."));
     117      Parameters.Add(new LookupParameter<IGenotypeToPhenotypeMapper>(GenotypeToPhenotypeMapperParameterName, "Maps the genotype (an integer vector) to the phenotype (a symbolic expression tree)."));
     118      Parameters.Add(new ValueLookupParameter<ISymbolicDataAnalysisGrammar>(SymbolicExpressionTreeGrammarParameterName, "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
     119
    99120      Parameters.Add(new ValueLookupParameter<IntRange>(EvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated."));
    100121      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
Note: See TracChangeset for help on using the changeset viewer.