Last change
on this file since 15450 was
15450,
checked in by gkronber, 6 years ago
|
#2789 more tests with CV and automatic determination of smoothing parameter
|
File size:
1.2 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Globalization;
|
---|
4 | using System.Linq;
|
---|
5 | using System.Text;
|
---|
6 | using System.Threading;
|
---|
7 | using System.Threading.Tasks;
|
---|
8 | using HeuristicLab.Algorithms.DataAnalysis.Experimental;
|
---|
9 | using HeuristicLab.Problems.DataAnalysis;
|
---|
10 |
|
---|
11 | namespace Main {
|
---|
12 | class Program {
|
---|
13 | static void Main(string[] args) {
|
---|
14 | var provider = new HeuristicLab.Problems.Instances.DataAnalysis.VariousInstanceProvider();
|
---|
15 | var problemData = provider.LoadData(provider.GetDataDescriptors().First(dd => dd.Name.Contains("Poly")));
|
---|
16 | // var provider = new HeuristicLab.Problems.Instances.DataAnalysis.RegressionRealWorldInstanceProvider();
|
---|
17 | // var problemData = provider.LoadData(provider.GetDataDescriptors().First(dd => dd.Name.Contains("Chem")));
|
---|
18 |
|
---|
19 | var gam = new GAM();
|
---|
20 | gam.MaxIterations = 10;
|
---|
21 | gam.MaxInteractions = 3;
|
---|
22 | gam.Problem.ProblemData = problemData;
|
---|
23 | gam.Start();
|
---|
24 |
|
---|
25 | var solution = (IRegressionSolution)gam.Results["Ensemble solution"].Value;
|
---|
26 |
|
---|
27 | Console.WriteLine("RMSE (train) {0}", solution.TrainingRootMeanSquaredError);
|
---|
28 | Console.WriteLine("RMSE (test) {0}", solution.TestRootMeanSquaredError);
|
---|
29 | }
|
---|
30 | }
|
---|
31 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.