[med-svn] [Git][med-team/libbpp-phyl][master] Improved failing test.

Julien Y. Dutheil gitlab at salsa.debian.org
Tue May 1 15:21:51 BST 2018


Julien Y. Dutheil pushed to branch master at Debian Med / libbpp-phyl


Commits:
e988691e by Julien Y. Dutheil at 2018-05-01T15:53:06+02:00
Improved failing test.

Merged with reduce time patch.

- - - - -


3 changed files:

- debian/patches/increase_test_tolerance.patch
- − debian/patches/reduce_test_time.patch
- debian/patches/series


Changes:

=====================================
debian/patches/increase_test_tolerance.patch
=====================================
--- a/debian/patches/increase_test_tolerance.patch
+++ b/debian/patches/increase_test_tolerance.patch
@@ -4,7 +4,7 @@ Description: By increasing tolerance of test boundaries the package should
  build on all architectures
 
 diff --git a/test/test_likelihood_nh.cpp b/test/test_likelihood_nh.cpp
-index b4cd485..b8358d1 100644
+index b4cd485..c38a277 100644
 --- a/test/test_likelihood_nh.cpp
 +++ b/test/test_likelihood_nh.cpp
 @@ -59,14 +59,14 @@ void fitModelNH(SubstitutionModelSet* model, DiscreteDistribution* rdist, const
@@ -25,3 +25,34 @@ index b4cd485..b8358d1 100644
      throw Exception("Incorrect final value.");
  }
  
+@@ -89,14 +89,14 @@ int main() {
+   DiscreteDistribution* rdist = new GammaDiscreteRateDistribution(4, 1.0);
+ 
+   size_t nsites = 1000;
+-  unsigned int nrep = 20;
++  unsigned int nrep = 5;
+   size_t nmodels = modelSet->getNumberOfModels();
+   vector<double> thetas(nmodels);
+   vector<double> thetasEst1(nmodels);
+   vector<double> thetasEst2(nmodels);
+ 
+   for (size_t i = 0; i < nmodels; ++i) {
+-    double theta = RandomTools::giveRandomNumberBetweenZeroAndEntry(0.99) + 0.005;
++    double theta = RandomTools::giveRandomNumberBetweenZeroAndEntry(0.9) + 0.05;
+     cout << "Theta" << i << " set to " << theta << endl; 
+     modelSet->setParameterValue("T92.theta_" + TextTools::toString(i + 1), theta);
+     thetas[i] = theta;
+@@ -119,11 +119,11 @@ int main() {
+     tl2.initialize();
+    
+     unsigned int c1 = OptimizationTools::optimizeNumericalParameters2(
+-        &tl, tl.getParameters(), 0,
++        &tl, tl.getSubstitutionModelParameters(), 0,
+         0.0001, 10000, messenger, profiler, false, false, 1, OptimizationTools::OPTIMIZATION_NEWTON);
+ 
+     unsigned int c2 = OptimizationTools::optimizeNumericalParameters2(
+-        &tl2, tl2.getParameters(), 0,
++        &tl2, tl2.getSubstitutionModelParameters(), 0,
+         0.0001, 10000, messenger, profiler, false, false, 1, OptimizationTools::OPTIMIZATION_NEWTON);
+ 
+     cout << c1 << ": " << tl.getValue() << "\t" << c2 << ": " << tl2.getValue() << endl;


=====================================
debian/patches/reduce_test_time.patch deleted
=====================================
--- a/debian/patches/reduce_test_time.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Author: Julien Y. Dutheil
-Last-Update: 2018-02-11 21:18:30 +0100
-Description: Reduce number of iterations to reduce test time
-
-diff --git a/test/test_likelihood_nh.cpp b/test/test_likelihood_nh.cpp
-index b4cd485..97431aa 100644
---- a/test/test_likelihood_nh.cpp
-+++ b/test/test_likelihood_nh.cpp
-@@ -89,7 +89,7 @@ int main() {
-   DiscreteDistribution* rdist = new GammaDiscreteRateDistribution(4, 1.0);
- 
-   size_t nsites = 1000;
--  unsigned int nrep = 20;
-+  unsigned int nrep = 3;
-   size_t nmodels = modelSet->getNumberOfModels();
-   vector<double> thetas(nmodels);
-   vector<double> thetasEst1(nmodels);


=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 unforce-cxxflags.patch
-reduce_test_time.patch
 increase_test_tolerance.patch



View it on GitLab: https://salsa.debian.org/med-team/libbpp-phyl/commit/e988691e2c0107969c54b6d74dd4cedd7c8f53f3

---
View it on GitLab: https://salsa.debian.org/med-team/libbpp-phyl/commit/e988691e2c0107969c54b6d74dd4cedd7c8f53f3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20180501/a5226882/attachment-0001.html>


More information about the debian-med-commit mailing list