Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17948


Ignore:
Timestamp:
04/16/21 19:24:30 (4 years ago)
Author:
gkronber
Message:

#3117: updated reference results in unit tests to match new results caused by updated alglib version.

Location:
trunk/HeuristicLab.Tests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs

    r17180 r17948  
    6969        // been able to identify the real cause. Presumably, execution on a Xeon and a Core i7 processor
    7070        // leads to different results.
    71         Assert.AreEqual(0.99174959007940156, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
    72         Assert.AreEqual(0.9836083751914968, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
    73         Assert.AreEqual(0.98298394717065463, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
    74         Assert.AreEqual(10100, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
    75         Assert.AreEqual(0.99174959007940156, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
    76         Assert.AreEqual(0.8962902319942232, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
     71        Assert.AreEqual(0.996270926227739, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
     72        Assert.AreEqual(0.95742113235788184, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
     73        Assert.AreEqual(0.83998301518760388, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
     74        Assert.AreEqual(10600, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
     75        Assert.AreEqual(0.996270926227739, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
     76        Assert.AreEqual(0.9963422035282139, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
    7777      } else {
    78         Assert.AreEqual(0.9971536312165723, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Qualitiy differs.");
    79         Assert.AreEqual(0.98382832370544937, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
    80         Assert.AreEqual(0.960805603777699, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
    81         Assert.AreEqual(10500, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
    82         Assert.AreEqual(0.9971536312165723, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
    83         Assert.AreEqual(0.010190137960908724, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
     78        Assert.AreEqual(0.9784573626949189, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
     79        Assert.AreEqual(0.82804701987417961, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
     80        Assert.AreEqual(0.700208975867862, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
     81        Assert.AreEqual(10300, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
     82        Assert.AreEqual(0.9784573626949189, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
     83        Assert.AreEqual(0.0014620645328474451, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
    8484      }
    8585    }
  • trunk/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs

    r17428 r17948  
    5252      gpr.Seed = 1618551877;
    5353      SamplesUtils.RunAlgorithm(gpr);
    54       Assert.AreEqual(-940.70700288855619, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"));
    55       Assert.AreEqual(0.99563390794061979, SamplesUtils.GetDoubleResult(gpr, "Training R²"));
     54      Assert.AreEqual(-992.445399028808, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"), 1e-8);
     55      Assert.AreEqual(0.99559260785271853, SamplesUtils.GetDoubleResult(gpr, "Training R²"), 1e-8);
    5656    }
    5757
  • trunk/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/ClassificationVariableImpactCalculationTest.cs

    r16422 r17948  
    214214    private Dictionary<string, double> GetExpectedValuesForIrisKNNModel() {
    215215      Dictionary<string, double> expectedImpacts = new Dictionary<string, double>();
    216       expectedImpacts.Add("petal_length", 0.21);
    217       expectedImpacts.Add("petal_width", 0.25);
    218       expectedImpacts.Add("sepal_length", 0.05);
     216      expectedImpacts.Add("petal_length", 0.22);
     217      expectedImpacts.Add("petal_width", 0.35);
     218      expectedImpacts.Add("sepal_length", 0.15);
    219219      expectedImpacts.Add("sepal_width", 0.05);
    220220
  • trunk/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/RegressionVariableImpactCalculationTest.cs

    r16443 r17948  
    271271    private Dictionary<string, double> GetExpectedValuesForRFTower() {
    272272      Dictionary<string, double> expectedImpacts = new Dictionary<string, double>();
    273       expectedImpacts.Add("x5", 0.00138095702433039);
    274       expectedImpacts.Add("x19", 0.00220739387855795);
    275       expectedImpacts.Add("x14", 0.00225120540266954);
    276       expectedImpacts.Add("x18", 0.00311857736968479);
    277       expectedImpacts.Add("x9", 0.00313474690023097);
    278       expectedImpacts.Add("x20", 0.00321781251408282);
    279       expectedImpacts.Add("x21", 0.00397483365571383);
    280       expectedImpacts.Add("x16", 0.00433280262892111);
    281       expectedImpacts.Add("x15", 0.00529918809786456);
    282       expectedImpacts.Add("x3", 0.00658791244929757);
    283       expectedImpacts.Add("x24", 0.0078645281886035);
    284       expectedImpacts.Add("x4", 0.00907314110749047);
    285       expectedImpacts.Add("x13", 0.0102943761648944);
    286       expectedImpacts.Add("x22", 0.0107132858548163);
    287       expectedImpacts.Add("x12", 0.0157078677788507);
    288       expectedImpacts.Add("x23", 0.0235857534562318);
    289       expectedImpacts.Add("x7", 0.0304143401617055);
    290       expectedImpacts.Add("x11", 0.0310773441767309);
    291       expectedImpacts.Add("x25", 0.0328308945873665);
    292       expectedImpacts.Add("x17", 0.0428771226844575);
    293       expectedImpacts.Add("x10", 0.0456335367972532);
    294       expectedImpacts.Add("x8", 0.049849257881126);
    295       expectedImpacts.Add("x1", 0.0663686086323108);
    296       expectedImpacts.Add("x2", 0.0799083890750926);
    297       expectedImpacts.Add("x6", 0.196557814244287);
     273      expectedImpacts.Add("x1", 0.0460043373592669);
     274      expectedImpacts.Add("x2", 0.0771677998074048);
     275      expectedImpacts.Add("x3", 0.00619316631767142);
     276      expectedImpacts.Add("x4", 0.0173307649229608);
     277      expectedImpacts.Add("x5", 0.00165078943166208);
     278      expectedImpacts.Add("x6", 0.393797136971534);
     279      expectedImpacts.Add("x7", 0.0103041010136826);
     280      expectedImpacts.Add("x8", 0.0218489557817256);
     281      expectedImpacts.Add("x9", 0.0033320239547433);
     282      expectedImpacts.Add("x10", 0.0386869026272391);
     283      expectedImpacts.Add("x11", 0.0194313200667007);
     284      expectedImpacts.Add("x12", 0.00685957264555537);
     285      expectedImpacts.Add("x13", 0.00996030046057605);
     286      expectedImpacts.Add("x14", 0.00290837005063926);
     287      expectedImpacts.Add("x15", 0.00487537076065259);
     288      expectedImpacts.Add("x16", 0.00469764322452204);
     289      expectedImpacts.Add("x17", 0.0373542975924628);
     290      expectedImpacts.Add("x18", 0.00208482408757715);
     291      expectedImpacts.Add("x19", 0.00250463259329947);
     292      expectedImpacts.Add("x20", 0.00211501042751294);
     293      expectedImpacts.Add("x21", 0.0028823562854704);
     294      expectedImpacts.Add("x22", 0.0113878041309722);
     295      expectedImpacts.Add("x23", 0.0454532954039953);
     296      expectedImpacts.Add("x24", 0.0115989415893684);
     297      expectedImpacts.Add("x25", 0.0196479481586532);
    298298
    299299      return expectedImpacts;
  • trunk/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs

    r17180 r17948  
    274274    [TestProperty("Time", "long")]
    275275    public void TestCompiledInterpreterEstimatedValuesConsistency() {
    276       const double delta = 1e-12;
     276      const double delta = 1e-8;
    277277
    278278      var twister = new MersenneTwister();
     
    288288      grammar.ConfigureAsDefaultRegressionGrammar();
    289289      grammar.Symbols.First(x => x.Name == "Power Functions").Enabled = true;
     290      grammar.Symbols.First(x => x is Cube).Enabled = true;
     291      grammar.Symbols.First(x => x is CubeRoot).Enabled = true;
     292      grammar.Symbols.First(x => x is Square).Enabled = true;
     293      grammar.Symbols.First(x => x is SquareRoot).Enabled = true;
     294      grammar.Symbols.First(x => x is Absolute).Enabled = true;
     295      grammar.Symbols.First(x => x is Sine).Enabled = true;
     296      grammar.Symbols.First(x => x is Cosine).Enabled = true;
     297      grammar.Symbols.First(x => x is Tangent).Enabled = true;
     298      grammar.Symbols.First(x => x is Root).Enabled = false;
     299      grammar.Symbols.First(x => x is Power).Enabled = false;
    290300
    291301      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 10, 0, 0);
     
    339349              }
    340350              string errorMessage = string.Format("Interpreters {0} and {1} do not agree on tree {2} and row {3} (seed = {4}).", interpreters[m].Name, interpreters[n].Name, i, row, seed);
    341               Assert.AreEqual(v1, v2, delta, errorMessage);
     351              Assert.IsTrue(double.IsPositiveInfinity(v1) && double.IsPositiveInfinity(v2) ||
     352                            double.IsNaN(v1) && double.IsNaN(v2) ||
     353                            double.IsNegativeInfinity(v1) && double.IsNegativeInfinity(v2) ||
     354                            Math.Abs(1.0 - v1 / v2) < delta, errorMessage);
    342355            }
    343356          }
  • trunk/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFClassificationScriptTest.cs

    r17180 r17948  
    5959
    6060      var bestSolution = ScriptingUtils.GetVariable<IClassificationSolution>(script, BestSolutionVariableName);
    61       Assert.AreEqual(0.85179407176287, bestSolution.TrainingAccuracy, 1E-8);
    62       Assert.AreEqual(0.81875, bestSolution.TestAccuracy, 1E-8);
     61      Assert.AreEqual(0.858034321372855, bestSolution.TrainingAccuracy, 1E-8);
     62      Assert.AreEqual(0.821875, bestSolution.TestAccuracy, 1E-8);
    6363    }
    6464
  • trunk/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFRegressionScriptTest.cs

    r17180 r17948  
    5959
    6060      var bestSolution = ScriptingUtils.GetVariable<IRegressionSolution>(script, BestSolutionVariableName);
    61       Assert.AreEqual(0.968329534139836, bestSolution.TrainingRSquared, 1E-8);
    62       Assert.AreEqual(0.982380790563445, bestSolution.TestRSquared, 1E-8);
     61      Assert.AreEqual(0.964218622548574, bestSolution.TrainingRSquared, 1E-8);
     62      Assert.AreEqual(0.985989017766796, bestSolution.TestRSquared, 1E-8);
    6363    }
    6464
  • trunk/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r17823 r17948  
    109109  </PropertyGroup>
    110110  <ItemGroup>
    111     <Reference Include="ALGLIB-3.7.0">
    112       <HintPath>..\bin\ALGLIB-3.7.0.dll</HintPath>
     111    <Reference Include="ALGLIB-3.17.0">
     112      <HintPath>..\bin\ALGLIB-3.17.0.dll</HintPath>
    113113      <Private>False</Private>
    114114    </Reference>
     
    201201      <SpecificVersion>False</SpecificVersion>
    202202      <HintPath>..\bin\HeuristicLab.Encodings.LinearLinkageEncoding-3.4.dll</HintPath>
     203      <Private>False</Private>
    203204    </Reference>
    204205    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3">
     
    277278      <Private>False</Private>
    278279    </Reference>
    279     <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4">
     280    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     281      <SpecificVersion>False</SpecificVersion>
    280282      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
    281283      <Private>False</Private>
    282284    </Reference>
    283     <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4">
     285    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     286      <SpecificVersion>False</SpecificVersion>
    284287      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>
    285288      <Private>False</Private>
Note: See TracChangeset for help on using the changeset viewer.