Loading debian/patches/increase_test_tolerance.patch +32 −1 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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.patchdeleted 100644 → 0 +0 −17 Original line number Diff line number Diff line 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 +0 −1 Original line number Diff line number Diff line unforce-cxxflags.patch reduce_test_time.patch increase_test_tolerance.patch Loading
debian/patches/increase_test_tolerance.patch +32 −1 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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.patchdeleted 100644 → 0 +0 −17 Original line number Diff line number Diff line 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 +0 −1 Original line number Diff line number Diff line unforce-cxxflags.patch reduce_test_time.patch increase_test_tolerance.patch