Changeset 17605 for branches/3040_VectorBasedGP
- Timestamp:
- 06/17/20 16:19:00 (4 years ago)
- Location:
- branches/3040_VectorBasedGP
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/NonlinearLeastSquaresConstantOptimizationEvaluator.cs
r17472 r17605 47 47 public int ConstantOptimizationIterations { 48 48 get { return ConstantOptimizationIterationsParameter.Value.Value; } 49 set { ConstantOptimizationIterationsParameter.Value.Value = value; } 49 50 } 50 51 #endregion -
branches/3040_VectorBasedGP/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs
r17180 r17605 184 184 problem.MaximumFunctionArguments.Value = 0; 185 185 186 var evaluator = new SymbolicRegressionConstantOptimizationEvaluator();187 evaluator.ConstantOptimizationIterations .Value= 5;186 var evaluator = new NonlinearLeastSquaresConstantOptimizationEvaluator(); 187 evaluator.ConstantOptimizationIterations = 5; 188 188 problem.EvaluatorParameter.Value = evaluator; 189 189 problem.RelativeNumberOfEvaluatedSamplesParameter.Hidden = true; -
branches/3040_VectorBasedGP/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/TableFileParserTest.cs
r17180 r17605 637 637 TableFileParser parser = new TableFileParser(); 638 638 try { 639 parser.Parse(tempFileName, 640 deCultureInfo.NumberFormat, 641 deCultureInfo.DateTimeFormat, 642 '\t', 643 true); 639 parser.Parse( 640 tempFileName, 641 new TableFileFormatOptions { 642 NumberFormat = deCultureInfo.NumberFormat, 643 DateTimeFormat = deCultureInfo.DateTimeFormat, 644 ColumnSeparator = '\t' 645 }, columnNamesInFirstLine: true); 644 646 Assert.AreEqual(6, parser.Rows); 645 647 Assert.AreEqual(4, parser.Columns); … … 676 678 try { 677 679 parser.Parse(tempFileName, 678 CultureInfo.InvariantCulture.NumberFormat, 679 CultureInfo.InvariantCulture.DateTimeFormat, 680 ',', 681 parser.AreColumnNamesInFirstLine(tempFileName)); 680 new TableFileFormatOptions { 681 NumberFormat = CultureInfo.InvariantCulture.NumberFormat, 682 DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat, 683 ColumnSeparator = ',' 684 }, parser.AreColumnNamesInFirstLine(tempFileName)); 682 685 Assert.AreEqual(6, parser.Rows); 683 686 Assert.AreEqual(4, parser.Columns); … … 716 719 try { 717 720 parser.Parse(tmpFileName, 718 CultureInfo.InvariantCulture.NumberFormat, 719 CultureInfo.InvariantCulture.DateTimeFormat, 720 separator: ',', columnNamesInFirstLine: true); 721 new TableFileFormatOptions { 722 NumberFormat = CultureInfo.InvariantCulture.NumberFormat, 723 DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat, 724 ColumnSeparator = ',' 725 }, columnNamesInFirstLine: true); 721 726 Assert.IsTrue(parser.Values[0] is List<double>); 722 727 Assert.AreEqual(double.NaN, parser.Values[0][0]); … … 746 751 try { 747 752 parser.Parse(tmpFileName, 748 CultureInfo.InvariantCulture.NumberFormat, 749 CultureInfo.InvariantCulture.DateTimeFormat, 750 separator: ',', columnNamesInFirstLine: true); 753 new TableFileFormatOptions { 754 NumberFormat = CultureInfo.InvariantCulture.NumberFormat, 755 DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat, 756 ColumnSeparator = ',' 757 }, columnNamesInFirstLine: true); 751 758 Assert.IsTrue(parser.Values[0] is List<string>); 752 759 Assert.AreEqual(string.Empty, parser.Values[0][0]); … … 777 784 try { 778 785 parser.Parse(tmpFileName, 779 CultureInfo.InvariantCulture.NumberFormat, 780 CultureInfo.InvariantCulture.DateTimeFormat, 781 separator: ',', columnNamesInFirstLine: true); 786 new TableFileFormatOptions { 787 NumberFormat = CultureInfo.InvariantCulture.NumberFormat, 788 DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat, 789 ColumnSeparator = ',' 790 }, columnNamesInFirstLine: true); 782 791 Assert.IsTrue(parser.Values[0] is List<string>); 783 792 Assert.AreEqual(string.Empty, parser.Values[0][0]); … … 809 818 try { 810 819 parser.Parse(tmpFileName, 811 CultureInfo.GetCultureInfo("de-de").NumberFormat, 812 CultureInfo.GetCultureInfo("de-de").DateTimeFormat, 813 separator: ',', columnNamesInFirstLine: true); 820 new TableFileFormatOptions { 821 NumberFormat = CultureInfo.GetCultureInfo("de-de").NumberFormat, 822 DateTimeFormat = CultureInfo.GetCultureInfo("de-de").DateTimeFormat, 823 ColumnSeparator = ',' 824 }, columnNamesInFirstLine: true); 814 825 Assert.IsTrue(parser.Values[0] is List<DateTime>); 815 826 Assert.AreEqual(new DateTime(2016, 6, 19), parser.Values[0][0]); … … 823 834 824 835 parser.Parse(tmpFileName, 825 CultureInfo.InvariantCulture.NumberFormat, 826 CultureInfo.InvariantCulture.DateTimeFormat, 827 separator: ',', columnNamesInFirstLine: true); 836 new TableFileFormatOptions { 837 NumberFormat = CultureInfo.InvariantCulture.NumberFormat, 838 DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat, 839 ColumnSeparator = ',' 840 }, columnNamesInFirstLine: true); 828 841 Assert.IsTrue(parser.Values[0] is List<DateTime>); 829 842 Assert.AreEqual(new DateTime(2016, 6, 19), parser.Values[0][0]); … … 848 861 try { 849 862 parser.Parse(tmpFileName, 850 CultureInfo.InvariantCulture.NumberFormat, 851 CultureInfo.InvariantCulture.DateTimeFormat, 852 separator: ',', columnNamesInFirstLine: true); 863 new TableFileFormatOptions { 864 NumberFormat = CultureInfo.InvariantCulture.NumberFormat, 865 DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat, 866 ColumnSeparator = ',' 867 }, columnNamesInFirstLine: true); 853 868 Assert.IsTrue(parser.Values[0] is List<string>); // time values should be parsed as strings 854 869 Assert.AreEqual("8:15", parser.Values[0][0]); … … 884 899 try { 885 900 parser.Parse(tmpFileName, 886 CultureInfo.InvariantCulture.NumberFormat, 887 CultureInfo.InvariantCulture.DateTimeFormat, 888 separator: ',', columnNamesInFirstLine: true); 901 new TableFileFormatOptions { 902 NumberFormat = CultureInfo.InvariantCulture.NumberFormat, 903 DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat, 904 ColumnSeparator = ',' 905 }, columnNamesInFirstLine: true); 889 906 // Parse should fail with an exception 890 907 Assert.Fail("expected exception TableFileParser.DataFormatException"); … … 915 932 try { 916 933 parser.Parse(tmpFileName, 917 CultureInfo.InvariantCulture.NumberFormat, 918 CultureInfo.InvariantCulture.DateTimeFormat, 919 separator: ',', columnNamesInFirstLine: true); 934 new TableFileFormatOptions { 935 NumberFormat = CultureInfo.InvariantCulture.NumberFormat, 936 DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat, 937 ColumnSeparator = ',' 938 }, columnNamesInFirstLine: true); 920 939 Assert.IsTrue(parser.Values[0] is List<double>); 921 940 Assert.IsTrue(parser.Values[1] is List<string>);
Note: See TracChangeset
for help on using the changeset viewer.