Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/14/09 17:09:56 (16 years ago)
Author:
mkommend
Message:

added SimpleR2Evaluator for SVMs + test engine (ticket #619)

Location:
trunk/sources/HeuristicLab.SupportVectorMachines
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.SupportVectorMachines/3.2/HeuristicLab.SupportVectorMachines-3.2.csproj

    r1810 r1814  
    6868    <Compile Include="Properties\AssemblyInfo.cs" />
    6969    <Compile Include="SimpleMSEEvaluator.cs" />
     70    <Compile Include="SimpleR2Evaluator.cs" />
    7071    <Compile Include="SupportVectorCreator.cs" />
    7172    <Compile Include="SupportVectorEvaluator.cs" />
  • trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SimpleMSEEvaluator.cs

    r1810 r1814  
    1818    public override IOperation Apply(IScope scope) {
    1919      ItemList values = GetVariableValue<ItemList>("Values", scope, true);
    20       double target;
    21       double estimated;
    22       double error;
    2320      double sse = 0;
    24       double cnt = 0;
     21      double cnt = 0;     
    2522      foreach (ItemList row in values) {
    26         estimated = ((DoubleData)row[0]).Data;
    27         target = ((DoubleData)row[1]).Data;
     23        double estimated = ((DoubleData)row[0]).Data;
     24        double target = ((DoubleData)row[1]).Data;
    2825        if (!double.IsNaN(estimated) && !double.IsInfinity(estimated) &&
    2926            !double.IsNaN(target) && !double.IsInfinity(target)) {
    30           error = estimated - target;
     27          double error = estimated - target;
    3128          sse += error * error;
    3229          cnt++;
Note: See TracChangeset for help on using the changeset viewer.