Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/09/09 14:34:56 (16 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)

Location:
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators
Files:
3 edited

Legend:

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

    r1891 r2034  
    4545    // evaluates the function-tree for the given target-variable and the whole dataset and returns the MSE
    4646    public override void Evaluate(IScope scope, ITreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
    47       double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, false).Data;
     47      double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, true).Data;
    4848      DoubleData mse = GetVariableValue<DoubleData>("MSE", scope, false, false);
    4949      if (mse == null) {
  • 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;
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Evaluators/UncertainMeanSquaredErrorEvaluator.cs

    r1891 r2034  
    5151    // evaluates the function-tree for the given target-variable and the whole dataset and returns the MSE
    5252    public override void Evaluate(IScope scope, ITreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
    53       double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, false).Data;
     53      double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, true).Data;
    5454      int minSamples = GetVariableValue<IntData>("MinEvaluatedSamples", scope, true).Data;
    5555      MersenneTwister mt = GetVariableValue<MersenneTwister>("Random", scope, true);
Note: See TracChangeset for help on using the changeset viewer.