Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/30/09 19:41:58 (15 years ago)
Author:
gkronber
Message:

GP Refactoring #713

  • cleaned code
  • reintegrated GP.Boolean and GP.SantaFe
  • worked on serialization of function trees
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.Boolean/3.3/Evaluator.cs

    r1529 r2216  
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Data;
     28using HeuristicLab.GP.Interfaces;
    2829using HeuristicLab.DataAnalysis;
    2930
     
    3233    public Evaluator()
    3334      : base() {
    34       AddVariableInfo(new VariableInfo("FunctionTree", "The function tree representing the ant", typeof(BakedFunctionTree), VariableKind.In));
     35      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree representing the boolean expression to evaluate", typeof(IGeneticProgrammingModel), VariableKind.In));
    3536      AddVariableInfo(new VariableInfo("Dataset", "The boolean dataset (values 0.0 = false, 1.0=true)", typeof(Dataset), VariableKind.In));
    3637      AddVariableInfo(new VariableInfo("TargetVariable", "Index of the column of the dataset that holds the target variable", typeof(IntData), VariableKind.In));
     
    4142
    4243    public override IOperation Apply(IScope scope) {
    43       BakedFunctionTree tree = GetVariableValue<BakedFunctionTree>("FunctionTree", scope, true);
     44      IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, true);
    4445      Dataset dataset = GetVariableValue<Dataset>("Dataset", scope, true);
    4546      int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data;
     
    4849
    4950      BooleanTreeInterpreter interpreter = new BooleanTreeInterpreter();
    50       interpreter.Reset(dataset, tree, targetVariable);
     51      interpreter.Reset(dataset, gpModel.FunctionTree, targetVariable);
    5152      int errors = interpreter.GetNumberOfErrors(start, end);
    5253
Note: See TracChangeset for help on using the changeset viewer.