Changeset 15459 for branches/MathNetNumerics-Exploration-2789/Main
- Timestamp:
- 11/07/17 19:49:23 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MathNetNumerics-Exploration-2789/Main/Program.cs
r15450 r15459 12 12 class Program { 13 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"))); 14 15 var xs = HeuristicLab.Common.SequenceGenerator.GenerateSteps(-3.5, 3.5, 0.02, includeEnd: true).ToArray(); 16 var ys = xs.Select(xi => (1.0 / (Math.Sqrt(2 * Math.PI)) * Math.Exp(-0.5 * xi * xi))).ToArray(); 17 18 alglib.hqrndstate state; 19 alglib.hqrndseed(1234, 5678, out state); 20 var ys_noise = ys.Select(yi => yi + alglib.hqrndnormal(state) * 0.01).ToArray(); 21 22 SBART.SBART_Report rep; 23 SBART.CalculateSBART(xs, ys_noise, "y", new string[] { "x" }, 1.0f, out rep); 24 25 26 // var provider = new HeuristicLab.Problems.Instances.DataAnalysis.VariousInstanceProvider(); 27 // var problemData = provider.LoadData(provider.GetDataDescriptors().First(dd => dd.Name.Contains("Poly"))); 28 var provider = new HeuristicLab.Problems.Instances.DataAnalysis.RegressionRealWorldInstanceProvider(); 29 var problemData = provider.LoadData(provider.GetDataDescriptors().First(dd => dd.Name.Contains("Chem"))); 18 30 19 31 var gam = new GAM(); 20 32 gam.MaxIterations = 10; 21 gam.MaxInteractions = 3;33 gam.MaxInteractions = 1; 22 34 gam.Problem.ProblemData = problemData; 23 35 gam.Start();
Note: See TracChangeset
for help on using the changeset viewer.