Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/17 13:12:41 (7 years ago)
Author:
gkronber
Message:

#2789 more tests with CV and automatic determination of smoothing parameter

Location:
branches/MathNetNumerics-Exploration-2789/Test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/MathNetNumerics-Exploration-2789/Test/Test.csproj

    r15443 r15450  
    6262      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
    6363    </Reference>
     64    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec" />
    6465    <Reference Include="HeuristicLab.Common-3.3">
    6566      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     
    9091    <Reference Include="HeuristicLab.Problems.Instances-3.3">
    9192      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
     93    </Reference>
     94    <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3">
     95      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.DataAnalysis-3.3.dll</HintPath>
    9296    </Reference>
    9397    <Reference Include="HeuristicLab.SequentialEngine-3.3">
  • branches/MathNetNumerics-Exploration-2789/Test/UnitTest1.cs

    r15443 r15450  
    110110
    111111      Console.WriteLine("Best tolerance {0}, RMSE (LOO): {1}", optTol, looRMSE);
     112    }
    112113
     114    [TestMethod]
     115    public void TestGAM() {
     116      var provider = new HeuristicLab.Problems.Instances.DataAnalysis.VariousInstanceProvider();
     117      var problemData = provider.LoadData(provider.GetDataDescriptors().First(dd => dd.Name.Contains("Poly")));
     118      // var provider = new HeuristicLab.Problems.Instances.DataAnalysis.RegressionRealWorldInstanceProvider();
     119      // var problemData = provider.LoadData(provider.GetDataDescriptors().First(dd => dd.Name.Contains("Chem")));
     120
     121      var gam = new GAM();
     122      gam.MaxIterations = 10;
     123      gam.MaxInteractions = 3;
     124      gam.Problem.ProblemData = problemData;
     125      gam.Start();
     126
     127      var solution = (IRegressionSolution)gam.Results["Ensemble solution"].Value;
     128
     129      Console.WriteLine("RMSE (train) {0}", solution.TrainingRootMeanSquaredError);
     130      Console.WriteLine("RMSE (test) {0}", solution.TestRootMeanSquaredError);
    113131    }
    114      
     132
    115133  }
    116134}
Note: See TracChangeset for help on using the changeset viewer.