Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/25/08 14:07:35 (16 years ago)
Author:
gkronber
Message:

added evaluator for mean absolute percentage error and added a parameter for the evaluator for theil's inequality to determine whether to calculate the coefficient for the change or for the absolute value

Location:
trunk/sources/HeuristicLab.StructureIdentification
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.StructureIdentification/Evaluation/TheilInequalityCoefficientEvaluator.cs

    r369 r395  
    4141    public TheilInequalityCoefficientEvaluator()
    4242      : base() {
     43      AddVariableInfo(new VariableInfo("Differential", "Wether to calculate the coefficient for the predicted change vs. original change or for the absolute prediction vs. original value", typeof(BoolData), VariableKind.In));
    4344    }
    4445
     
    4647      int trainingStart = GetVariableValue<IntData>("TrainingSamplesStart", scope, true).Data;
    4748      int trainingEnd = GetVariableValue<IntData>("TrainingSamplesEnd", scope, true).Data;
     49      bool difference = GetVariableValue<BoolData>("Differential", scope, true).Data;
    4850      double errorsSquaredSum = 0.0;
    4951      double estimatedSquaredSum = 0.0;
     
    5153      functionTree.PrepareEvaluation(dataset);
    5254      for(int sample = trainingStart; sample < trainingEnd; sample++) {
    53         double prevValue = dataset.GetValue(sample - 1, targetVariable);
     55        double prevValue = 0.0;
     56        if(difference) prevValue = dataset.GetValue(sample - 1, targetVariable);
    5457        double estimatedChange = functionTree.Evaluate(sample) - prevValue;
    5558        double originalChange = dataset.GetValue(sample, targetVariable) - prevValue;
  • trunk/sources/HeuristicLab.StructureIdentification/HeuristicLab.StructureIdentification.csproj

    r369 r395  
    4848  </ItemGroup>
    4949  <ItemGroup>
     50    <Compile Include="Evaluation\MeanAbsolutePercentageErrorEvaluator.cs" />
    5051    <Compile Include="Evaluation\TheilInequalityCoefficientEvaluator.cs" />
    5152    <Compile Include="Evaluation\SimpleEvaluator.cs" />
Note: See TracChangeset for help on using the changeset viewer.