Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/09/15 18:46:20 (9 years ago)
Author:
gkronber
Message:

#2261: improved performance of evaluation for regression tree models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GBT-trunkintegration/Tests/Test.cs

    r12661 r12699  
    183183      gbt.Iterations = 5000;
    184184      gbt.MaxSize = 20;
     185      gbt.CreateSolution = false;
    185186      #endregion
    186187
    187188      RunAlgorithm(gbt);
    188189
     190      Console.WriteLine(gbt.ExecutionTime);
    189191      Assert.AreEqual(267.68704241153921, ((DoubleValue)gbt.Results["Loss (train)"].Value).Value, 1E-6);
    190192      Assert.AreEqual(393.84704062205469, ((DoubleValue)gbt.Results["Loss (test)"].Value).Value, 1E-6);
     
    209211      gbt.Nu = 0.02;
    210212      gbt.LossFunctionParameter.Value = gbt.LossFunctionParameter.ValidValues.First(l => l.ToString().Contains("Absolute"));
     213      gbt.CreateSolution = false;
    211214      #endregion
    212215
    213216      RunAlgorithm(gbt);
    214217
     218      Console.WriteLine(gbt.ExecutionTime);
    215219      Assert.AreEqual(10.551385044666661, ((DoubleValue)gbt.Results["Loss (train)"].Value).Value, 1E-6);
    216220      Assert.AreEqual(12.918001745581172, ((DoubleValue)gbt.Results["Loss (test)"].Value).Value, 1E-6);
     
    235239      gbt.Nu = 0.005;
    236240      gbt.LossFunctionParameter.Value = gbt.LossFunctionParameter.ValidValues.First(l => l.ToString().Contains("Relative"));
     241      gbt.CreateSolution = false;
    237242      #endregion
    238243
    239244      RunAlgorithm(gbt);
    240245
     246      Console.WriteLine(gbt.ExecutionTime);
    241247      Assert.AreEqual(0.061954221604374943, ((DoubleValue)gbt.Results["Loss (train)"].Value).Value, 1E-6);
    242248      Assert.AreEqual(0.06316303473499961, ((DoubleValue)gbt.Results["Loss (test)"].Value).Value, 1E-6);
Note: See TracChangeset for help on using the changeset viewer.