Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/09/09 14:34:56 (15 years ago)
Author:
gkronber
Message:

Implemented a first version of an operator to calculate variable impacts of models (generated by GP or SVM). #644 (Variable impact of CEDMA models should be calculated and stored in the result DB)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/GPEvaluatorBase.cs

    r1891 r2034  
    4040      AddVariableInfo(new VariableInfo("PunishmentFactor", "Punishment factor for invalid estimations", typeof(DoubleData), VariableKind.In));
    4141      AddVariableInfo(new VariableInfo("TotalEvaluatedNodes", "Number of evaluated nodes", typeof(DoubleData), VariableKind.In | VariableKind.Out));
     42      AddVariableInfo(new VariableInfo("TrainingSamplesStart", "Start index of training samples in dataset", typeof(IntData), VariableKind.In));
     43      AddVariableInfo(new VariableInfo("TrainingSamplesEnd", "End index of training samples in dataset", typeof(IntData), VariableKind.In));
    4244      AddVariableInfo(new VariableInfo("SamplesStart", "Start index of samples in dataset to evaluate", typeof(IntData), VariableKind.In));
    4345      AddVariableInfo(new VariableInfo("SamplesEnd", "End index of samples in dataset to evaluate", typeof(IntData), VariableKind.In));
     
    5153      IFunctionTree functionTree = GetVariableValue<IFunctionTree>("FunctionTree", scope, true);
    5254      double punishmentFactor = GetVariableValue<DoubleData>("PunishmentFactor", scope, true).Data;
    53       int treeSize = scope.GetVariableValue<IntData>("TreeSize", false).Data;
     55      int treeSize = scope.GetVariableValue<IntData>("TreeSize", true).Data;
    5456      double totalEvaluatedNodes = scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data;
     57      int trainingStart = GetVariableValue<IntData>("TrainingSamplesStart", scope, true).Data;
     58      int trainingEnd = GetVariableValue<IntData>("TrainingSamplesEnd", scope, true).Data;
    5559      int start = GetVariableValue<IntData>("SamplesStart", scope, true).Data;
    5660      int end = GetVariableValue<IntData>("SamplesEnd", scope, true).Data;
    5761      bool useEstimatedValues = GetVariableValue<BoolData>("UseEstimatedTargetValue", scope, true).Data;
    5862      ITreeEvaluator evaluator = GetVariableValue<ITreeEvaluator>("TreeEvaluator", scope, true);
    59       evaluator.PrepareForEvaluation(functionTree);
     63      evaluator.PrepareForEvaluation(dataset, targetVariable, trainingStart, trainingEnd, punishmentFactor, functionTree);
    6064
    6165      double[] backupValues = null;
Note: See TracChangeset for help on using the changeset viewer.