Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1889


Ignore:
Timestamp:
05/25/09 16:37:40 (16 years ago)
Author:
gkronber
Message:

Added calculation of MAPE, MAPRE, VAF to hard-coded SVM algorithm. #624 (Algorithm for support vector regression)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs

    r1874 r1889  
    129129      modelCreator.GetVariableInfo("SVMRangeTransform").ActualName = "RangeTransform";
    130130      modelCreator.GetVariableInfo("SVMType").ActualName = "Type";
    131      
     131
    132132
    133133      modelProcessor.AddSubOperator(modelCreator);
     
    192192      op.Name = p + "Evaluator";
    193193      SequentialProcessor seqProc = new SequentialProcessor();
    194      
     194
    195195      SupportVectorEvaluator evaluator = new SupportVectorEvaluator();
    196196      evaluator.Name = p + "SimpleEvaluator";
     
    208208      r2Evaluator.GetVariableInfo("Values").ActualName = p + "Values";
    209209      r2Evaluator.GetVariableInfo("R2").ActualName = p + "R2";
     210      SimpleMeanAbsolutePercentageErrorEvaluator mapeEvaluator = new SimpleMeanAbsolutePercentageErrorEvaluator();
     211      mapeEvaluator.Name = p + "MAPEEvaluator";
     212      mapeEvaluator.GetVariableInfo("Values").ActualName = p + "Values";
     213      mapeEvaluator.GetVariableInfo("MAPE").ActualName = p + "MAPE";
     214      SimpleMeanAbsolutePercentageOfRangeErrorEvaluator mapreEvaluator = new SimpleMeanAbsolutePercentageOfRangeErrorEvaluator();
     215      mapreEvaluator.Name = p + "MAPREEvaluator";
     216      mapreEvaluator.GetVariableInfo("Values").ActualName = p + "Values";
     217      mapreEvaluator.GetVariableInfo("MAPRE").ActualName = p + "MAPRE";
     218      SimpleVarianceAccountedForEvaluator vafEvaluator = new SimpleVarianceAccountedForEvaluator();
     219      vafEvaluator.Name = p + "VAFEvaluator";
     220      vafEvaluator.GetVariableInfo("Values").ActualName = p + "Values";
     221      vafEvaluator.GetVariableInfo("VAF").ActualName = p + "VAF";
    210222
    211223      seqProc.AddSubOperator(evaluator);
    212224      seqProc.AddSubOperator(mseEvaluator);
    213225      seqProc.AddSubOperator(r2Evaluator);
     226      seqProc.AddSubOperator(mapeEvaluator);
     227      seqProc.AddSubOperator(mapreEvaluator);
     228      seqProc.AddSubOperator(vafEvaluator);
    214229
    215230      op.OperatorGraph.AddOperator(seqProc);
     
    241256      progOp.RemoveVariableInfo("Result");
    242257      progOp.AddVariableInfo(new VariableInfo("Value", "Value", typeof(IntData), VariableKind.In | VariableKind.Out));
    243       progOp.Code ="Value.Data = 0;";
     258      progOp.Code = "Value.Data = 0;";
    244259      progOp.GetVariableInfo("Value").ActualName = paramName;
    245260      return progOp;
Note: See TracChangeset for help on using the changeset viewer.