Changeset 15776
- Timestamp:
- 02/14/18 10:56:02 (7 years ago)
- Location:
- branches/2886_SymRegGrammarEnumeration
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/GrammarEnumeration/GrammarEnumerationAlgorithm.cs
r15765 r15776 84 84 85 85 public GrammarEnumerationAlgorithm() { 86 var provider = new HeuristicLab.Problems.Instances.DataAnalysis. VariousInstanceProvider(seed: 1234);87 var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains(" Poly-10")));86 var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(seed: 1234); 87 var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F9 "))); 88 88 89 89 Problem = new RegressionProblem() { -
branches/2886_SymRegGrammarEnumeration/Test/GrammarEnumerationTest.cs
r15773 r15776 1 1 using System; 2 using System.Diagnostics;3 2 using System.Linq; 4 3 using HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration; 5 4 using HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration.GrammarEnumeration; 6 using HeuristicLab.Common;7 5 using HeuristicLab.Core; 8 using HeuristicLab.Data;9 using HeuristicLab.Optimization;10 6 using HeuristicLab.Problems.DataAnalysis; 7 using HeuristicLab.Problems.Instances.DataAnalysis; 11 8 using HeuristicLab.Random; 12 9 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 58 55 // x³ + x² + x 59 56 alg.MaxTreeSize = 15; 60 Console.WriteLine(alg.MaxTreeSize); 61 var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(Seed); 62 var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F1 "))); 63 alg.Problem.ProblemData = regProblem; 57 alg.Problem.ProblemData = new NguyenFunctionOne(Seed).GenerateRegressionData(); 64 58 65 59 alg.Start(); … … 92 86 // x^4 + x³ + x² + x 93 87 alg.MaxTreeSize = 20; 94 var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(Seed); 95 var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F2 "))); 96 alg.Problem.ProblemData = regProblem; 88 alg.Problem.ProblemData = new NguyenFunctionTwo(Seed).GenerateRegressionData(); 97 89 98 90 alg.Start(); … … 106 98 // x^5 + x^4 + x^3 + x^2 + x 107 99 alg.MaxTreeSize = 32; 108 var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(Seed); 109 var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F3 "))); 110 alg.Problem.ProblemData = regProblem; 100 alg.Problem.ProblemData = new NguyenFunctionThree(Seed).GenerateRegressionData(); 111 101 112 102 alg.Start(); … … 120 110 // sin(x) + sin(x + x²) 121 111 alg.MaxTreeSize = 15; 122 var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(Seed); 123 var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F6 "))); 124 alg.Problem.ProblemData = regProblem; 112 alg.Problem.ProblemData = new NguyenFunctionSix(Seed).GenerateRegressionData(); 125 113 126 114 alg.Start(); … … 133 121 // sin(x) + sin(y²) 134 122 alg.MaxTreeSize = 10; 135 var provider = new HeuristicLab.Problems.Instances.DataAnalysis.NguyenInstanceProvider(Seed); 136 var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("F9 "))); 137 alg.Problem.ProblemData = regProblem; 123 alg.Problem.ProblemData = new NguyenFunctionNine(Seed).GenerateRegressionData(); 138 124 139 125 alg.Start(); … … 146 132 public void MctsSymbReg_NoConstants_Poly10() { 147 133 alg.MaxTreeSize = 10; 148 var provider = new HeuristicLab.Problems.Instances.DataAnalysis.VariousInstanceProvider(Seed); 149 var regProblem = provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name.Contains("Poly"))); 150 alg.Problem.ProblemData = regProblem; 134 alg.Problem.ProblemData = new PolyTen(Seed).GenerateRegressionData(); 151 135 152 136 alg.Start();
Note: See TracChangeset
for help on using the changeset viewer.