- Timestamp:
- 07/30/09 19:41:58 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-Refactoring-713/sources/HeuristicLab.GP.Boolean/3.3/Evaluator.cs
r1529 r2216 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.GP.Interfaces; 28 29 using HeuristicLab.DataAnalysis; 29 30 … … 32 33 public Evaluator() 33 34 : 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)); 35 36 AddVariableInfo(new VariableInfo("Dataset", "The boolean dataset (values 0.0 = false, 1.0=true)", typeof(Dataset), VariableKind.In)); 36 37 AddVariableInfo(new VariableInfo("TargetVariable", "Index of the column of the dataset that holds the target variable", typeof(IntData), VariableKind.In)); … … 41 42 42 43 public override IOperation Apply(IScope scope) { 43 BakedFunctionTree tree = GetVariableValue<BakedFunctionTree>("FunctionTree", scope, true);44 IGeneticProgrammingModel gpModel = GetVariableValue<IGeneticProgrammingModel>("FunctionTree", scope, true); 44 45 Dataset dataset = GetVariableValue<Dataset>("Dataset", scope, true); 45 46 int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data; … … 48 49 49 50 BooleanTreeInterpreter interpreter = new BooleanTreeInterpreter(); 50 interpreter.Reset(dataset, tree, targetVariable);51 interpreter.Reset(dataset, gpModel.FunctionTree, targetVariable); 51 52 int errors = interpreter.GetNumberOfErrors(start, end); 52 53
Note: See TracChangeset
for help on using the changeset viewer.