From 3be39d5bad87474dadf674dc0351c0666214c4d4 Mon Sep 17 00:00:00 2001 From: Cody Simmons Date: Tue, 12 Nov 2024 09:36:01 -0500 Subject: [PATCH 1/6] updated test code with correct priors and new test datasets --- src/tests/src/test_cpp.cpp | 256 +++++++++++++++++++++++++----- tests/test_bmdscore/testNested.py | 6 +- 2 files changed, 217 insertions(+), 45 deletions(-) diff --git a/src/tests/src/test_cpp.cpp b/src/tests/src/test_cpp.cpp index 5a32f933..d40c4bc8 100644 --- a/src/tests/src/test_cpp.cpp +++ b/src/tests/src/test_cpp.cpp @@ -49,8 +49,8 @@ int main(void) { // runPythonDichoAnalysis(); // runPythonDichoMA(); // runPythonContAnalysis(); - runPythonMultitumorAnalysis(); - // runPythonNestedAnalysis(); + // runPythonMultitumorAnalysis(); + runPythonNestedAnalysis(); // Nlogist_probs_test(); // Nlogist_lk_test(); //// runTestMultitumorModel(); @@ -4936,46 +4936,218 @@ void runPythonNestedAnalysis() { 9, 13, 12, 10, 10, 11, 14, 11, 11, 14, 11, 10, 11, 10, 15, 7, 14, 11, 14, 12, 13, 12, 14, 11, 8, 10}; - // testing dataset id:1 - // std::vector D = - // {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,300,1200,1200,1200,1200,1200,1200,1200,1200,1200}; - // std::vector LS = - // {1,3,3,5,5,5,6,7,7,8,8,8,8,8,9,9,10,10,10,10,11,3,6,6,6,7,7,8,8,8,8,9,9,9,9,9,10,10,11,11,12,2,4,5,5,7,7,7,8,8,8,9,9,9,9,10,10,10,11,11,11,11,12,16,2,3,5,7,9,9,10,10,10}; - // std::vector I = - // {1,0,2,0,3,1,0,0,0,0,0,1,1,2,0,0,1,0,0,0,11,2,6,4,0,4,1,0,1,1,0,0,0,0,1,0,0,2,0,0,0,2,4,3,5,0,1,2,8,0,0,0,1,1,1,1,1,0,0,1,0,1,0,12,2,1,0,1,1,9,2,4,1}; - // std::vector LSC = - // {1.0,3.0,3.0,5.0,5.0,5.0,6.0,7.0,7.0,8.0,8.0,8.0,8.0,8.0,9.0,9.0,10.0,10.0,10.0,10.0,11.0,3.0,6.0,6.0,6.0,7.0,7.0,8.0,8.0,8.0,8.0,9.0,9.0,9.0,9.0,9.0,10.0,10.0,11.0,11.0,12.0,2.0,4.0,5.0,5.0,7.0,7.0,7.0,8.0,8.0,8.0,9.0,9.0,9.0,9.0,10.0,10.0,10.0,11.0,11.0,11.0,11.0,12.0,16.0,2.0,3.0,5.0,7.0,9.0,9.0,10.0,10.0,10.0}; - - // testing dataset id:2 - // std::vector D = - // {0,0,0,0,0,0,0,0,0,0,25,25,25,25,25,25,25,25,25,25,50,50,50,50,50,50,50,50,50,50,100,100,100,100,100,100,100,100,100}; - // std::vector LS = - // {16,9,15,14,13,9,10,14,10,11,14,9,14,9,13,12,10,10,11,14,11,11,14,11,10,11,10,15,7,14,11,14,12,13,12,14,11,8,10}; - // std::vector I = - // {1,1,2,3,3,0,2,2,1,2,4,5,6,2,6,3,1,2,4,3,4,5,5,4,5,4,5,6,2,4,6,6,8,7,8,6,6,5,4}; - // std::vector LSC = - // {1,1,2,3,3,0,2,2,1,2,4,5,6,2,6,3,1,2,4,3,4,5,5,4,5,4,5,6,2,4,6,6,8,7,8,6,6,5,4}; - - // testing dataset id:10 - // std::vector D = - // {0,0,0,0,0,0,0,0,0,0,25,25,25,25,25,25,25,25,25,25,50,50,50,50,50,50,50,50,50,50,100,100,100,100,100,100,100,100,100}; - // std::vector LS = - // {16,9,15,14,13,9,10,14,10,11,14,9,14,9,13,12,10,10,11,14,11,11,14,11,10,11,10,15,7,14,11,14,12,13,12,14,11,8,10 - //}; - // std::vector I = - // {1,1,2,3,3,0,2,2,1,2,4,5,6,2,6,3,1,2,4,3,4,5,5,4,5,4,5,6,2,4,6,6,8,7,8,6,6,5,4}; - // std::vector LSC = - // {16.0,9.0,15.0,14.0,13.0,9.0,10.0,14.0,10.0,11.0,14.0,9.0,14.0,9.0,13.0,12.0,10.0,10.0,11.0,14.0,11.0,11.0,14.0,11.0,10.0,11.0,10.0,15.0,7.0,14.0,11.0,14.0,12.0,13.0,12.0,14.0,11.0,8.0,10.0}; - - // testing dataset id:3 - // std::vector D = - // {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000,5000}; - // std::vector LS = - // {6,6,5,6,2,7,5,6,6,6,6,5,5,1,3,3,6,2,8,2,4,7,5,7,5,6,4,2,8,4,4,7,4,6,8,3,5,7,6,2,7,7,7,5,6,8,4,8,2,1,5,6,2,7,1,3,5,2,4,8,5,8,5,8,7,4,5,7,3,3,3,7,6,7,7,7,7,6,6,6,6,6,6,8,7,5,5,6,5,6,6,6,6,7,7,6,9,8,6,5,4,5,6,7,6,7,1,2,6,4,3,5,7,5,4,5,6,7,4,6,5,1,6,3,4}; - // std::vector I = - // {0,2,2,0,0,3,0,2,1,0,1,1,0,0,0,1,0,2,1,1,0,0,1,1,1,1,0,0,1,2,0,3,0,2,1,0,1,0,0,0,1,2,3,1,0,1,0,0,0,0,0,3,0,0,0,1,0,1,0,2,0,3,4,0,2,1,1,2,0,1,3,1,2,0,1,1,3,2,4,2,3,4,0,5,1,1,3,2,5,0,2,5,6,3,5,5,6,7,3,1,4,4,0,6,0,7,1,2,6,4,3,4,5,5,3,5,5,7,2,4,3,1,5,1,4}; - // std::vector LSC = - // {6.0,13.0,6.0,7.0,11.0,12.0,14.0,12.0,9.0,9.0,11.0,7.0,9.0,13.0,4.0,13.0,9.0,6.0,9.0,5.0,6.0,7.0,11.0,9.0,14.0,7.0,4.0,2.0,13.0,12.0,7.0,7.0,9.0,9.0,8.0,14.0,9.0,7.0,9.0,9.0,10.0,7.0,11.0,5.0,10.0,10.0,8.0,14.0,10.0,13.0,10.0,14.0,14.0,8.0,6.0,3.0,10.0,9.0,10.0,9.0,14.0,8.0,14.0,13.0,10.0,14.0,6.0,12.0,9.0,7.0,14.0,11.0,14.0,9.0,7.0,11.0,10.0,14.0,10.0,8.0,13.0,11.0,10.0,13.0,7.0,6.0,14.0,6.0,7.0,14.0,8.0,12.0,6.0,10.0,13.0,12.0,10.0,11.0,8.0,6.0,5.0,14.0,14.0,13.0,12.0,9.0,4.0,13.0,6.0,12.0,3.0,7.0,7.0,10.0,14.0,11.0,14.0,7.0,4.0,8.0,10.0,13.0,7.0,10.0,4.0}; +// // testing dataset id:1 +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 30, 30, +// 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, +// 30, 30, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, +// 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 1200, +// 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200}; +// std::vector LS = {1, 3, 3, 5, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 10, 10, 10, +// 10, 11, 3, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, +// 11, 11, 12, 2, 4, 5, 5, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, +// 10, 11, 11, 11, 11, 12, 16, 2, 3, 5, 7, 9, 9, 10, 10, 10}; +// std::vector I = {1, 0, 2, 0, 3, 1, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, +// 0, 11, 2, 6, 4, 0, 4, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 2, +// 0, 0, 0, 2, 4, 3, 5, 0, 1, 2, 8, 0, 0, 0, 1, 1, 1, 1, 1, +// 0, 0, 1, 0, 1, 0, 12, 2, 1, 0, 1, 1, 9, 2, 4, 1}; +// std::vector LSC = {1.0, 3.0, 3.0, 5.0, 5.0, 5.0, 6.0, 7.0, 7.0, 8.0, 8.0, +// 8.0, 8.0, 8.0, 9.0, 9.0, 10.0, 10.0, 10.0, 10.0, 11.0, 3.0, +// 6.0, 6.0, 6.0, 7.0, 7.0, 8.0, 8.0, 8.0, 8.0, 9.0, 9.0, +// 9.0, 9.0, 9.0, 10.0, 10.0, 11.0, 11.0, 12.0, 2.0, 4.0, 5.0, +// 5.0, 7.0, 7.0, 7.0, 8.0, 8.0, 8.0, 9.0, 9.0, 9.0, 9.0, +// 10.0, 10.0, 10.0, 11.0, 11.0, 11.0, 11.0, 12.0, 16.0, 2.0, 3.0, +// 5.0, 7.0, 9.0, 9.0, 10.0, 10.0, 10.0}; +// +// // testing dataset id:2 +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, +// 25, 25, 25, 25, 25, 25, 25, 50, 50, 50, 50, 50, 50, +// 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100}; +// std::vector LS = {16, 9, 15, 14, 13, 9, 10, 14, 10, 11, 14, 9, 14, +// 9, 13, 12, 10, 10, 11, 14, 11, 11, 14, 11, 10, 11, +// 10, 15, 7, 14, 11, 14, 12, 13, 12, 14, 11, 8, 10}; +// std::vector I = {1, 1, 2, 3, 3, 0, 2, 2, 1, 2, 4, 5, 6, 2, 6, 3, 1, 2, 4, 3, +// 4, 5, 5, 4, 5, 4, 5, 6, 2, 4, 6, 6, 8, 7, 8, 6, 6, 5, 4}; +// std::vector LSC = {1, 1, 2, 3, 3, 0, 2, 2, 1, 2, 4, 5, 6, 2, 6, 3, 1, 2, 4, 3, +// 4, 5, 5, 4, 5, 4, 5, 6, 2, 4, 6, 6, 8, 7, 8, 6, 6, 5, 4}; +// +// // testing dataset id:3 +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, +// 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, +// 500, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, +// 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, +// 1000, 1000, 1000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, +// 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, +// 2000, 2000, 2000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, +// 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, +// 5000, 5000, 5000, 5000, 5000}; +// std::vector LS = {6, 6, 5, 6, 2, 7, 5, 6, 6, 6, 6, 5, 5, 1, 3, 3, 6, 2, 8, 2, 4, +// 7, 5, 7, 5, 6, 4, 2, 8, 4, 4, 7, 4, 6, 8, 3, 5, 7, 6, 2, 7, 7, +// 7, 5, 6, 8, 4, 8, 2, 1, 5, 6, 2, 7, 1, 3, 5, 2, 4, 8, 5, 8, 5, +// 8, 7, 4, 5, 7, 3, 3, 3, 7, 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 8, +// 7, 5, 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 9, 8, 6, 5, 4, 5, 6, 7, 6, +// 7, 1, 2, 6, 4, 3, 5, 7, 5, 4, 5, 6, 7, 4, 6, 5, 1, 6, 3, 4}; +// std::vector I = {0, 2, 2, 0, 0, 3, 0, 2, 1, 0, 1, 1, 0, 0, 0, 1, 0, 2, 1, 1, 0, +// 0, 1, 1, 1, 1, 0, 0, 1, 2, 0, 3, 0, 2, 1, 0, 1, 0, 0, 0, 1, 2, +// 3, 1, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 4, +// 0, 2, 1, 1, 2, 0, 1, 3, 1, 2, 0, 1, 1, 3, 2, 4, 2, 3, 4, 0, 5, +// 1, 1, 3, 2, 5, 0, 2, 5, 6, 3, 5, 5, 6, 7, 3, 1, 4, 4, 0, 6, 0, +// 7, 1, 2, 6, 4, 3, 4, 5, 5, 3, 5, 5, 7, 2, 4, 3, 1, 5, 1, 4}; +// std::vector LSC = {6.0, 13.0, 6.0, 7.0, 11.0, 12.0, 14.0, 12.0, 9.0, 9.0, 11.0, 7.0, +// 9.0, 13.0, 4.0, 13.0, 9.0, 6.0, 9.0, 5.0, 6.0, 7.0, 11.0, 9.0, +// 14.0, 7.0, 4.0, 2.0, 13.0, 12.0, 7.0, 7.0, 9.0, 9.0, 8.0, 14.0, +// 9.0, 7.0, 9.0, 9.0, 10.0, 7.0, 11.0, 5.0, 10.0, 10.0, 8.0, 14.0, +// 10.0, 13.0, 10.0, 14.0, 14.0, 8.0, 6.0, 3.0, 10.0, 9.0, 10.0, 9.0, +// 14.0, 8.0, 14.0, 13.0, 10.0, 14.0, 6.0, 12.0, 9.0, 7.0, 14.0, 11.0, +// 14.0, 9.0, 7.0, 11.0, 10.0, 14.0, 10.0, 8.0, 13.0, 11.0, 10.0, 13.0, +// 7.0, 6.0, 14.0, 6.0, 7.0, 14.0, 8.0, 12.0, 6.0, 10.0, 13.0, 12.0, +// 10.0, 11.0, 8.0, 6.0, 5.0, 14.0, 14.0, 13.0, 12.0, 9.0, 4.0, 13.0, +// 6.0, 12.0, 3.0, 7.0, 7.0, 10.0, 14.0, 11.0, 14.0, 7.0, 4.0, 8.0, +// 10.0, 13.0, 7.0, 10.0, 4.0}; +// +// // testing dataset id:4 +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, +// 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, +// 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}; +// std::vector LS = {17, 14, 9, 10, 12, 10, 10, 11, 10, 6, 7, 7, 15, 14, 10, 13, 12, 11, +// 12, 14, 15, 12, 11, 12, 12, 14, 12, 11, 13, 13, 12, 11, 12, 14, 9, 12, +// 9, 17, 13, 10, 12, 10, 8, 10, 4, 9, 9, 6, 4, 7, 13, 10, 13, 11}; +// std::vector I = {3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +// 2, 2, 3, 2, 3, 2, 4, 2, 4, 2, 3, 2, 2, 2, 2, 2, 2, 2, +// 2, 17, 9, 8, 12, 10, 8, 10, 4, 6, 9, 5, 4, 7, 3, 7, 10, 4}; +// std::vector LSC = {31.9, 29.2, 25.3, 26.3, 26.7, 27.8, 25.7, 27.5, 28.9, 27.4, 27.1, +// 26, 30.2, 28.9, 26.4, 24.9, 24.2, 26.9, 24.2, 26.9, 28.1, 30.6, +// 26.1, 29.3, 31.1, 28.1, 24.3, 25.6, 25.3, 27, 26.8, 26.7, 26.3, +// 26.8, 26.7, 26.8, 30.9, 30.1, 26.2, 25.6, 24.9, 25.5, 26.1, 25.7, +// 26.8, 28.1, 27.4, 25.2, 26.4, 26, 26.2, 27.5, 28.6, 25.5}; +// +// // testing dataset id:5; +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, +// 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, +// 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, +// 1000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, +// 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, +// 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, +// 2000, 2000, 2000, 2000, 2000, 2000, 5000, 5000, 5000, 5000, 5000, 5000, +// 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, +// 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, +// 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000}; +// std::vector LS = {6, 6, 5, 6, 2, 7, 5, 6, 6, 6, 6, 5, 5, 1, 3, 3, 6, 2, 8, 2, 4, 7, 5, 7, +// 5, 2, 6, 7, 7, 8, 4, 7, 5, 6, 7, 6, 2, 5, 1, 7, 7, 6, 8, 7, 7, 4, 3, 6, +// 3, 4, 7, 5, 6, 6, 8, 5, 8, 6, 7, 1, 5, 6, 2, 7, 1, 3, 5, 2, 4, 8, 5, 8, +// 5, 8, 7, 4, 5, 7, 3, 3, 3, 7, 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 8, 7, 5, +// 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 9, 8, 6, 9, 7, 8, 7, 7, 6, 7, 5, 2, 6, 7, +// 7, 4, 3, 4, 7, 6, 5, 4, 5, 6, 7, 6, 7, 1, 2, 6, 4, 3, 5, 7, 5, 4, 5, 6, +// 7, 4, 6, 5, 1, 6, 3, 4, 6, 2, 6, 6, 6, 6, 7, 3, 6, 4, 1, 8, 3, 4}; +// std::vector I = {0, 6, 3, 0, 0, 5, 0, 3, 1, 0, 3, 1, 0, 0, 0, 1, 0, 2, 3, 1, 0, 0, 1, 1, +// 1, 0, 1, 3, 2, 1, 1, 1, 0, 3, 0, 2, 0, 1, 0, 5, 3, 5, 8, 2, 2, 0, 0, 3, +// 1, 1, 1, 0, 2, 5, 4, 1, 2, 3, 2, 0, 0, 3, 0, 0, 0, 1, 0, 2, 0, 2, 0, 8, +// 4, 0, 2, 3, 1, 2, 2, 1, 3, 2, 2, 2, 3, 3, 3, 2, 4, 2, 3, 4, 0, 5, 1, 1, +// 3, 2, 5, 0, 2, 5, 6, 3, 5, 5, 6, 7, 3, 0, 4, 0, 1, 4, 3, 1, 3, 2, 5, 5, +// 4, 1, 3, 2, 0, 3, 1, 4, 4, 0, 6, 0, 7, 1, 2, 6, 4, 3, 4, 5, 5, 3, 5, 5, +// 7, 2, 4, 3, 1, 5, 1, 4, 6, 1, 3, 5, 4, 2, 5, 1, 6, 4, 1, 0, 3, 4}; +// std::vector LSC = {6, 6, 5, 6, 2, 7, 5, 6, 6, 6, 6, 5, 5, 1, 3, 3, 6, 2, 8, 2, 4, 7, 5, 7, +// 5, 2, 6, 7, 7, 8, 4, 7, 5, 6, 7, 6, 2, 5, 1, 7, 7, 6, 8, 7, 7, 4, 3, 6, +// 3, 4, 7, 5, 6, 6, 8, 5, 8, 6, 7, 1, 5, 6, 2, 7, 1, 3, 5, 2, 4, 8, 5, 8, +// 5, 8, 7, 4, 5, 7, 3, 3, 3, 7, 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 8, 7, 5, +// 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 9, 8, 6, 9, 7, 8, 7, 7, 6, 7, 5, 2, 6, 7, +// 7, 4, 3, 4, 7, 6, 5, 4, 5, 6, 7, 6, 7, 1, 2, 6, 4, 3, 5, 7, 5, 4, 5, 6, +// 7, 4, 6, 5, 1, 6, 3, 4, 6, 2, 6, 6, 6, 6, 7, 3, 6, 4, 1, 8, 3, 4}; +// +// // testing dataset id:6; +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, +// 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, +// 100, 100, 100, 100, 100, 100, 250, 250, 250, 250, 250, 250, 250, 250, +// 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250}; +// std::vector < double LS = {15, 17, 14, 14, 15, 15, 18, 12, 15, 15, 15, 19, 15, 16, 18, 18, 19, 13, +// 16, 13, 8, 14, 18, 15, 14, 14, 13, 16, 16, 15, 14, 16, 14, 14, 15, 16, +// 12, 16, 16, 1, 14, 18, 16, 16, 15, 15, 15, 12, 18, 16, 16, 15, 15, 17, +// 14, 15, 13, 15, 17, 16, 16, 11, 15, 12, 6, 6, 2, 18, 18, 12}; +// std::vector I = {0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, +// 0, 2, 1, 1, 0, 0, 1, 0, 0, 3, 1, 1, 3, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, +// 1, 2, 5, 1, 2, 0, 1, 0, 0, 0, 1, 1, 1, 3, 0, 1, 2, 0, 0, 2, 2, 4}; +// std::vector LSC = {15, 17, 14, 14, 15, 15, 18, 12, 15, 15, 15, 19, 15, 16, 18, 18, 19, 13, +// 16, 13, 8, 14, 18, 15, 14, 14, 13, 16, 16, 15, 14, 16, 14, 14, 15, 16, +// 12, 16, 16, 1, 14, 18, 16, 16, 15, 15, 15, 12, 18, 16, 16, 15, 15, 17, +// 14, 15, 13, 15, 17, 16, 16, 11, 15, 12, 6, 6, 2, 18, 18, 12}; +// +// // testing dataset id:7; +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, +// 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, +// 100, 100, 100, 100, 100, 100, 250, 250, 250, 250, 250, 250, 250, 250, +// 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, +// 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500}; +// std::vector < double LS = {15, 17, 14, 14, 15, 15, 18, 12, 15, 15, 15, 19, 15, 16, 18, 18, 19, +// 13, 16, 13, 8, 14, 18, 15, 14, 14, 13, 16, 16, 15, 14, 16, 14, 14, +// 15, 16, 12, 16, 16, 1, 14, 18, 16, 16, 15, 15, 15, 12, 18, 16, 16, +// 15, 15, 17, 14, 15, 13, 15, 17, 16, 16, 11, 15, 12, 6, 6, 2, 18, +// 18, 12, 5, 12, 5, 15, 12, 16, 9, 6, 6, 11, 2}; +// std::vector I = {0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, +// 1, 1, 0, 0, 2, 1, 1, 0, 0, 1, 0, 0, 3, 1, 1, 3, 2, 0, 0, 0, 0, +// 0, 1, 0, 1, 0, 0, 1, 2, 5, 1, 2, 0, 1, 0, 0, 0, 1, 1, 1, 3, 0, +// 1, 2, 0, 0, 2, 2, 4, 0, 0, 1, 2, 1, 0, 1, 0, 1, 0, 0}; +// std::vector LSC = {170, 160, 147, 153, 158, 153, 168, 165, 164, 166, 149, 174, 156, 160, +// 158, 161, 166, 172, 181, 177, 141, 144, 157, 161, 159, 153, 146, 167, +// 150, 159, 152, 165, 166, 158, 168, 143, 148, 177, 154, 153, 179, 171, +// 180, 170, 165, 157, 164, 162, 159, 160, 151, 141, 179, 150, 153, 175, +// 146, 161, 167, 165, 166, 162, 157, 153, 158, 166, 167, 146, 164, 155, +// 161, 158, 181, 159, 151, 152, 166, 176, 165, 144, 144}; +// +// // testing dataset id:8; +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 250, 250, +// 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, +// 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 625, +// 625, 625, 625, 625, 625, 625, 625, 625, 625}; +// +// std::vector < double LS = {4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, +// 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, +// 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4}; +// std::vector I = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, +// 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 3, 3, 0, 0, 1, 4, +// 2, 1, 2, 2, 4, 1, 3, 2, 2, 4, 3, 3, 4, 2, 4, 4, 3, 4, 4}; +// std::vector LSC = {12, 17, 12, 15, 18, 13, 16, 11, 13, 14, 11, 16, 12, 14, 14, +// 12, 15, 15, 13, 16, 16, 18, 11, 12, 14, 14, 16, 14, 14, 16, +// 10, 12, 15, 14, 13, 10, 14, 17, 15, 17, 15, 16, 11, 14, 15, +// 11, 13, 11, 12, 16, 15, 11, 11, 15, 12, 13, 19}; +// +// // testing dataset id:9; +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 250, 250, +// 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, +// 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 625, +// 625, 625, 625, 625, 625, 625, 625, 625, 625}; +// std::vector < double LS = {4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, +// 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, +// 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4}; +// std::vector I = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, +// 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 3, 3, 0, 0, 1, 4, +// 2, 1, 2, 2, 4, 1, 3, 2, 2, 4, 3, 3, 4, 2, 4, 4, 3, 4, 4}; +// std::vector LSC = {4, 5, 3, 6, 8, 8, 5, 7, 10, 6, 5, 12, 6, 7, 9, 7, 6, 10, 7, +// 8, 9, 11, 5, 10, 4, 9, 12, 6, 8, 9, 3, 7, 7, 9, 7, 4, 7, 12, +// 6, 9, 7, 7, 5, 6, 5, 6, 11, 7, 4, 9, 7, 8, 8, 10, 8, 9, 8}; +// +// // testing dataset id:10 +// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, +// 25, 25, 25, 25, 25, 25, 25, 50, 50, 50, 50, 50, 50, +// 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100}; +// std::vector LS = {16, 9, 15, 14, 13, 9, 10, 14, 10, 11, 14, 9, 14, +// 9, 13, 12, 10, 10, 11, 14, 11, 11, 14, 11, 10, 11, +// 10, 15, 7, 14, 11, 14, 12, 13, 12, 14, 11, 8, 10}; +// std::vector I = {1, 1, 2, 3, 3, 0, 2, 2, 1, 2, 4, 5, 6, 2, 6, 3, 1, 2, 4, 3, +// 4, 5, 5, 4, 5, 4, 5, 6, 2, 4, 6, 6, 8, 7, 8, 6, 6, 5, 4}; +// std::vector LSC = {16.0, 9.0, 15.0, 14.0, 13.0, 9.0, 10.0, 14.0, 10.0, 11.0, +// 14.0, 9.0, 14.0, 9.0, 13.0, 12.0, 10.0, 10.0, 11.0, 14.0, +// 11.0, 11.0, 14.0, 11.0, 10.0, 11.0, 10.0, 15.0, 7.0, 14.0, +// 11.0, 14.0, 12.0, 13.0, 12.0, 14.0, 11.0, 8.0, 10.0}; pyAnal.doses = D; pyAnal.litterSize = LS; diff --git a/tests/test_bmdscore/testNested.py b/tests/test_bmdscore/testNested.py index 936bb687..4aa9b7b1 100644 --- a/tests/test_bmdscore/testNested.py +++ b/tests/test_bmdscore/testNested.py @@ -7,12 +7,12 @@ def getNLogisticPrior(ngrp, prior_cols, restricted): prG = np.array([0, 1]) - prB = np.array([-1 * sys.float_info.max, sys.float_info.max]) + prB = np.array([-18, 18]) prT1 = np.array([0, 1]) - prT2 = np.array([-1 * sys.float_info.max, sys.float_info.max]) + prT2 = np.array([-18, 18]) prUR = np.array([0, 18]) prRR = np.array([1, 18]) - prP = np.array([0, sys.float_info.max]) + prP = np.array([0, 18]) pr = [] for i in range(prior_cols): pr.append(prG[i]) From 0e4e96c16f207f720bcf63d0959c0720f0103a1a Mon Sep 17 00:00:00 2001 From: Cody Simmons Date: Tue, 12 Nov 2024 10:05:37 -0500 Subject: [PATCH 2/6] formatting --- src/tests/src/test_cpp.cpp | 442 +++++++++++++++++++------------------ 1 file changed, 230 insertions(+), 212 deletions(-) diff --git a/src/tests/src/test_cpp.cpp b/src/tests/src/test_cpp.cpp index d40c4bc8..07c9f99f 100644 --- a/src/tests/src/test_cpp.cpp +++ b/src/tests/src/test_cpp.cpp @@ -4936,218 +4936,236 @@ void runPythonNestedAnalysis() { 9, 13, 12, 10, 10, 11, 14, 11, 11, 14, 11, 10, 11, 10, 15, 7, 14, 11, 14, 12, 13, 12, 14, 11, 8, 10}; -// // testing dataset id:1 -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 30, 30, -// 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, -// 30, 30, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, -// 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 1200, -// 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200}; -// std::vector LS = {1, 3, 3, 5, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 10, 10, 10, -// 10, 11, 3, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, -// 11, 11, 12, 2, 4, 5, 5, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, -// 10, 11, 11, 11, 11, 12, 16, 2, 3, 5, 7, 9, 9, 10, 10, 10}; -// std::vector I = {1, 0, 2, 0, 3, 1, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, -// 0, 11, 2, 6, 4, 0, 4, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 2, -// 0, 0, 0, 2, 4, 3, 5, 0, 1, 2, 8, 0, 0, 0, 1, 1, 1, 1, 1, -// 0, 0, 1, 0, 1, 0, 12, 2, 1, 0, 1, 1, 9, 2, 4, 1}; -// std::vector LSC = {1.0, 3.0, 3.0, 5.0, 5.0, 5.0, 6.0, 7.0, 7.0, 8.0, 8.0, -// 8.0, 8.0, 8.0, 9.0, 9.0, 10.0, 10.0, 10.0, 10.0, 11.0, 3.0, -// 6.0, 6.0, 6.0, 7.0, 7.0, 8.0, 8.0, 8.0, 8.0, 9.0, 9.0, -// 9.0, 9.0, 9.0, 10.0, 10.0, 11.0, 11.0, 12.0, 2.0, 4.0, 5.0, -// 5.0, 7.0, 7.0, 7.0, 8.0, 8.0, 8.0, 9.0, 9.0, 9.0, 9.0, -// 10.0, 10.0, 10.0, 11.0, 11.0, 11.0, 11.0, 12.0, 16.0, 2.0, 3.0, -// 5.0, 7.0, 9.0, 9.0, 10.0, 10.0, 10.0}; -// -// // testing dataset id:2 -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, -// 25, 25, 25, 25, 25, 25, 25, 50, 50, 50, 50, 50, 50, -// 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100}; -// std::vector LS = {16, 9, 15, 14, 13, 9, 10, 14, 10, 11, 14, 9, 14, -// 9, 13, 12, 10, 10, 11, 14, 11, 11, 14, 11, 10, 11, -// 10, 15, 7, 14, 11, 14, 12, 13, 12, 14, 11, 8, 10}; -// std::vector I = {1, 1, 2, 3, 3, 0, 2, 2, 1, 2, 4, 5, 6, 2, 6, 3, 1, 2, 4, 3, -// 4, 5, 5, 4, 5, 4, 5, 6, 2, 4, 6, 6, 8, 7, 8, 6, 6, 5, 4}; -// std::vector LSC = {1, 1, 2, 3, 3, 0, 2, 2, 1, 2, 4, 5, 6, 2, 6, 3, 1, 2, 4, 3, -// 4, 5, 5, 4, 5, 4, 5, 6, 2, 4, 6, 6, 8, 7, 8, 6, 6, 5, 4}; -// -// // testing dataset id:3 -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, -// 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, -// 500, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, -// 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, -// 1000, 1000, 1000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, -// 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, -// 2000, 2000, 2000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, -// 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, -// 5000, 5000, 5000, 5000, 5000}; -// std::vector LS = {6, 6, 5, 6, 2, 7, 5, 6, 6, 6, 6, 5, 5, 1, 3, 3, 6, 2, 8, 2, 4, -// 7, 5, 7, 5, 6, 4, 2, 8, 4, 4, 7, 4, 6, 8, 3, 5, 7, 6, 2, 7, 7, -// 7, 5, 6, 8, 4, 8, 2, 1, 5, 6, 2, 7, 1, 3, 5, 2, 4, 8, 5, 8, 5, -// 8, 7, 4, 5, 7, 3, 3, 3, 7, 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 8, -// 7, 5, 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 9, 8, 6, 5, 4, 5, 6, 7, 6, -// 7, 1, 2, 6, 4, 3, 5, 7, 5, 4, 5, 6, 7, 4, 6, 5, 1, 6, 3, 4}; -// std::vector I = {0, 2, 2, 0, 0, 3, 0, 2, 1, 0, 1, 1, 0, 0, 0, 1, 0, 2, 1, 1, 0, -// 0, 1, 1, 1, 1, 0, 0, 1, 2, 0, 3, 0, 2, 1, 0, 1, 0, 0, 0, 1, 2, -// 3, 1, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 4, -// 0, 2, 1, 1, 2, 0, 1, 3, 1, 2, 0, 1, 1, 3, 2, 4, 2, 3, 4, 0, 5, -// 1, 1, 3, 2, 5, 0, 2, 5, 6, 3, 5, 5, 6, 7, 3, 1, 4, 4, 0, 6, 0, -// 7, 1, 2, 6, 4, 3, 4, 5, 5, 3, 5, 5, 7, 2, 4, 3, 1, 5, 1, 4}; -// std::vector LSC = {6.0, 13.0, 6.0, 7.0, 11.0, 12.0, 14.0, 12.0, 9.0, 9.0, 11.0, 7.0, -// 9.0, 13.0, 4.0, 13.0, 9.0, 6.0, 9.0, 5.0, 6.0, 7.0, 11.0, 9.0, -// 14.0, 7.0, 4.0, 2.0, 13.0, 12.0, 7.0, 7.0, 9.0, 9.0, 8.0, 14.0, -// 9.0, 7.0, 9.0, 9.0, 10.0, 7.0, 11.0, 5.0, 10.0, 10.0, 8.0, 14.0, -// 10.0, 13.0, 10.0, 14.0, 14.0, 8.0, 6.0, 3.0, 10.0, 9.0, 10.0, 9.0, -// 14.0, 8.0, 14.0, 13.0, 10.0, 14.0, 6.0, 12.0, 9.0, 7.0, 14.0, 11.0, -// 14.0, 9.0, 7.0, 11.0, 10.0, 14.0, 10.0, 8.0, 13.0, 11.0, 10.0, 13.0, -// 7.0, 6.0, 14.0, 6.0, 7.0, 14.0, 8.0, 12.0, 6.0, 10.0, 13.0, 12.0, -// 10.0, 11.0, 8.0, 6.0, 5.0, 14.0, 14.0, 13.0, 12.0, 9.0, 4.0, 13.0, -// 6.0, 12.0, 3.0, 7.0, 7.0, 10.0, 14.0, 11.0, 14.0, 7.0, 4.0, 8.0, -// 10.0, 13.0, 7.0, 10.0, 4.0}; -// -// // testing dataset id:4 -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, -// 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -// 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}; -// std::vector LS = {17, 14, 9, 10, 12, 10, 10, 11, 10, 6, 7, 7, 15, 14, 10, 13, 12, 11, -// 12, 14, 15, 12, 11, 12, 12, 14, 12, 11, 13, 13, 12, 11, 12, 14, 9, 12, -// 9, 17, 13, 10, 12, 10, 8, 10, 4, 9, 9, 6, 4, 7, 13, 10, 13, 11}; -// std::vector I = {3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -// 2, 2, 3, 2, 3, 2, 4, 2, 4, 2, 3, 2, 2, 2, 2, 2, 2, 2, -// 2, 17, 9, 8, 12, 10, 8, 10, 4, 6, 9, 5, 4, 7, 3, 7, 10, 4}; -// std::vector LSC = {31.9, 29.2, 25.3, 26.3, 26.7, 27.8, 25.7, 27.5, 28.9, 27.4, 27.1, -// 26, 30.2, 28.9, 26.4, 24.9, 24.2, 26.9, 24.2, 26.9, 28.1, 30.6, -// 26.1, 29.3, 31.1, 28.1, 24.3, 25.6, 25.3, 27, 26.8, 26.7, 26.3, -// 26.8, 26.7, 26.8, 30.9, 30.1, 26.2, 25.6, 24.9, 25.5, 26.1, 25.7, -// 26.8, 28.1, 27.4, 25.2, 26.4, 26, 26.2, 27.5, 28.6, 25.5}; -// -// // testing dataset id:5; -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, -// 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, -// 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, -// 1000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, -// 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, -// 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, -// 2000, 2000, 2000, 2000, 2000, 2000, 5000, 5000, 5000, 5000, 5000, 5000, -// 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, -// 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, -// 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000}; -// std::vector LS = {6, 6, 5, 6, 2, 7, 5, 6, 6, 6, 6, 5, 5, 1, 3, 3, 6, 2, 8, 2, 4, 7, 5, 7, -// 5, 2, 6, 7, 7, 8, 4, 7, 5, 6, 7, 6, 2, 5, 1, 7, 7, 6, 8, 7, 7, 4, 3, 6, -// 3, 4, 7, 5, 6, 6, 8, 5, 8, 6, 7, 1, 5, 6, 2, 7, 1, 3, 5, 2, 4, 8, 5, 8, -// 5, 8, 7, 4, 5, 7, 3, 3, 3, 7, 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 8, 7, 5, -// 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 9, 8, 6, 9, 7, 8, 7, 7, 6, 7, 5, 2, 6, 7, -// 7, 4, 3, 4, 7, 6, 5, 4, 5, 6, 7, 6, 7, 1, 2, 6, 4, 3, 5, 7, 5, 4, 5, 6, -// 7, 4, 6, 5, 1, 6, 3, 4, 6, 2, 6, 6, 6, 6, 7, 3, 6, 4, 1, 8, 3, 4}; -// std::vector I = {0, 6, 3, 0, 0, 5, 0, 3, 1, 0, 3, 1, 0, 0, 0, 1, 0, 2, 3, 1, 0, 0, 1, 1, -// 1, 0, 1, 3, 2, 1, 1, 1, 0, 3, 0, 2, 0, 1, 0, 5, 3, 5, 8, 2, 2, 0, 0, 3, -// 1, 1, 1, 0, 2, 5, 4, 1, 2, 3, 2, 0, 0, 3, 0, 0, 0, 1, 0, 2, 0, 2, 0, 8, -// 4, 0, 2, 3, 1, 2, 2, 1, 3, 2, 2, 2, 3, 3, 3, 2, 4, 2, 3, 4, 0, 5, 1, 1, -// 3, 2, 5, 0, 2, 5, 6, 3, 5, 5, 6, 7, 3, 0, 4, 0, 1, 4, 3, 1, 3, 2, 5, 5, -// 4, 1, 3, 2, 0, 3, 1, 4, 4, 0, 6, 0, 7, 1, 2, 6, 4, 3, 4, 5, 5, 3, 5, 5, -// 7, 2, 4, 3, 1, 5, 1, 4, 6, 1, 3, 5, 4, 2, 5, 1, 6, 4, 1, 0, 3, 4}; -// std::vector LSC = {6, 6, 5, 6, 2, 7, 5, 6, 6, 6, 6, 5, 5, 1, 3, 3, 6, 2, 8, 2, 4, 7, 5, 7, -// 5, 2, 6, 7, 7, 8, 4, 7, 5, 6, 7, 6, 2, 5, 1, 7, 7, 6, 8, 7, 7, 4, 3, 6, -// 3, 4, 7, 5, 6, 6, 8, 5, 8, 6, 7, 1, 5, 6, 2, 7, 1, 3, 5, 2, 4, 8, 5, 8, -// 5, 8, 7, 4, 5, 7, 3, 3, 3, 7, 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 8, 7, 5, -// 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 9, 8, 6, 9, 7, 8, 7, 7, 6, 7, 5, 2, 6, 7, -// 7, 4, 3, 4, 7, 6, 5, 4, 5, 6, 7, 6, 7, 1, 2, 6, 4, 3, 5, 7, 5, 4, 5, 6, -// 7, 4, 6, 5, 1, 6, 3, 4, 6, 2, 6, 6, 6, 6, 7, 3, 6, 4, 1, 8, 3, 4}; -// -// // testing dataset id:6; -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, -// 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, -// 100, 100, 100, 100, 100, 100, 250, 250, 250, 250, 250, 250, 250, 250, -// 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250}; -// std::vector < double LS = {15, 17, 14, 14, 15, 15, 18, 12, 15, 15, 15, 19, 15, 16, 18, 18, 19, 13, -// 16, 13, 8, 14, 18, 15, 14, 14, 13, 16, 16, 15, 14, 16, 14, 14, 15, 16, -// 12, 16, 16, 1, 14, 18, 16, 16, 15, 15, 15, 12, 18, 16, 16, 15, 15, 17, -// 14, 15, 13, 15, 17, 16, 16, 11, 15, 12, 6, 6, 2, 18, 18, 12}; -// std::vector I = {0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, -// 0, 2, 1, 1, 0, 0, 1, 0, 0, 3, 1, 1, 3, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, -// 1, 2, 5, 1, 2, 0, 1, 0, 0, 0, 1, 1, 1, 3, 0, 1, 2, 0, 0, 2, 2, 4}; -// std::vector LSC = {15, 17, 14, 14, 15, 15, 18, 12, 15, 15, 15, 19, 15, 16, 18, 18, 19, 13, -// 16, 13, 8, 14, 18, 15, 14, 14, 13, 16, 16, 15, 14, 16, 14, 14, 15, 16, -// 12, 16, 16, 1, 14, 18, 16, 16, 15, 15, 15, 12, 18, 16, 16, 15, 15, 17, -// 14, 15, 13, 15, 17, 16, 16, 11, 15, 12, 6, 6, 2, 18, 18, 12}; -// -// // testing dataset id:7; -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, -// 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, -// 100, 100, 100, 100, 100, 100, 250, 250, 250, 250, 250, 250, 250, 250, -// 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, -// 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500}; -// std::vector < double LS = {15, 17, 14, 14, 15, 15, 18, 12, 15, 15, 15, 19, 15, 16, 18, 18, 19, -// 13, 16, 13, 8, 14, 18, 15, 14, 14, 13, 16, 16, 15, 14, 16, 14, 14, -// 15, 16, 12, 16, 16, 1, 14, 18, 16, 16, 15, 15, 15, 12, 18, 16, 16, -// 15, 15, 17, 14, 15, 13, 15, 17, 16, 16, 11, 15, 12, 6, 6, 2, 18, -// 18, 12, 5, 12, 5, 15, 12, 16, 9, 6, 6, 11, 2}; -// std::vector I = {0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, -// 1, 1, 0, 0, 2, 1, 1, 0, 0, 1, 0, 0, 3, 1, 1, 3, 2, 0, 0, 0, 0, -// 0, 1, 0, 1, 0, 0, 1, 2, 5, 1, 2, 0, 1, 0, 0, 0, 1, 1, 1, 3, 0, -// 1, 2, 0, 0, 2, 2, 4, 0, 0, 1, 2, 1, 0, 1, 0, 1, 0, 0}; -// std::vector LSC = {170, 160, 147, 153, 158, 153, 168, 165, 164, 166, 149, 174, 156, 160, -// 158, 161, 166, 172, 181, 177, 141, 144, 157, 161, 159, 153, 146, 167, -// 150, 159, 152, 165, 166, 158, 168, 143, 148, 177, 154, 153, 179, 171, -// 180, 170, 165, 157, 164, 162, 159, 160, 151, 141, 179, 150, 153, 175, -// 146, 161, 167, 165, 166, 162, 157, 153, 158, 166, 167, 146, 164, 155, -// 161, 158, 181, 159, 151, 152, 166, 176, 165, 144, 144}; -// -// // testing dataset id:8; -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 250, 250, -// 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, -// 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 625, -// 625, 625, 625, 625, 625, 625, 625, 625, 625}; -// -// std::vector < double LS = {4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -// 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, -// 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4}; -// std::vector I = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, -// 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 3, 3, 0, 0, 1, 4, -// 2, 1, 2, 2, 4, 1, 3, 2, 2, 4, 3, 3, 4, 2, 4, 4, 3, 4, 4}; -// std::vector LSC = {12, 17, 12, 15, 18, 13, 16, 11, 13, 14, 11, 16, 12, 14, 14, -// 12, 15, 15, 13, 16, 16, 18, 11, 12, 14, 14, 16, 14, 14, 16, -// 10, 12, 15, 14, 13, 10, 14, 17, 15, 17, 15, 16, 11, 14, 15, -// 11, 13, 11, 12, 16, 15, 11, 11, 15, 12, 13, 19}; -// -// // testing dataset id:9; -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 250, 250, -// 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, -// 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 625, -// 625, 625, 625, 625, 625, 625, 625, 625, 625}; -// std::vector < double LS = {4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, -// 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, -// 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4}; -// std::vector I = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, -// 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 3, 3, 0, 0, 1, 4, -// 2, 1, 2, 2, 4, 1, 3, 2, 2, 4, 3, 3, 4, 2, 4, 4, 3, 4, 4}; -// std::vector LSC = {4, 5, 3, 6, 8, 8, 5, 7, 10, 6, 5, 12, 6, 7, 9, 7, 6, 10, 7, -// 8, 9, 11, 5, 10, 4, 9, 12, 6, 8, 9, 3, 7, 7, 9, 7, 4, 7, 12, -// 6, 9, 7, 7, 5, 6, 5, 6, 11, 7, 4, 9, 7, 8, 8, 10, 8, 9, 8}; -// -// // testing dataset id:10 -// std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, -// 25, 25, 25, 25, 25, 25, 25, 50, 50, 50, 50, 50, 50, -// 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100}; -// std::vector LS = {16, 9, 15, 14, 13, 9, 10, 14, 10, 11, 14, 9, 14, -// 9, 13, 12, 10, 10, 11, 14, 11, 11, 14, 11, 10, 11, -// 10, 15, 7, 14, 11, 14, 12, 13, 12, 14, 11, 8, 10}; -// std::vector I = {1, 1, 2, 3, 3, 0, 2, 2, 1, 2, 4, 5, 6, 2, 6, 3, 1, 2, 4, 3, -// 4, 5, 5, 4, 5, 4, 5, 6, 2, 4, 6, 6, 8, 7, 8, 6, 6, 5, 4}; -// std::vector LSC = {16.0, 9.0, 15.0, 14.0, 13.0, 9.0, 10.0, 14.0, 10.0, 11.0, -// 14.0, 9.0, 14.0, 9.0, 13.0, 12.0, 10.0, 10.0, 11.0, 14.0, -// 11.0, 11.0, 14.0, 11.0, 10.0, 11.0, 10.0, 15.0, 7.0, 14.0, -// 11.0, 14.0, 12.0, 13.0, 12.0, 14.0, 11.0, 8.0, 10.0}; + // // testing dataset id:1 + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 0, 0, 0, 0, 0, 0, 0, 0, 30, 30, 30, 30, 30, + // 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + // 30, 30, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + // 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + // 300, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200, 1200}; + // std::vector LS = {1, 3, 3, 5, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 10, 10, 10, + // 10, 11, 3, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, + // 11, 11, 12, 2, 4, 5, 5, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, + // 10, 11, 11, 11, 11, 12, 16, 2, 3, 5, 7, 9, 9, 10, 10, 10}; + // std::vector I = {1, 0, 2, 0, 3, 1, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, + // 0, 11, 2, 6, 4, 0, 4, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 2, + // 0, 0, 0, 2, 4, 3, 5, 0, 1, 2, 8, 0, 0, 0, 1, 1, 1, 1, 1, + // 0, 0, 1, 0, 1, 0, 12, 2, 1, 0, 1, 1, 9, 2, 4, 1}; + // std::vector LSC = {1.0, 3.0, 3.0, 5.0, 5.0, 5.0, 6.0, 7.0, 7.0, 8.0, 8.0, + // 8.0, 8.0, 8.0, 9.0, 9.0, 10.0, 10.0, 10.0, 10.0, 11.0, 3.0, + // 6.0, 6.0, 6.0, 7.0, 7.0, 8.0, 8.0, 8.0, 8.0, 9.0, 9.0, + // 9.0, 9.0, 9.0, 10.0, 10.0, 11.0, 11.0, 12.0, 2.0, 4.0, 5.0, + // 5.0, 7.0, 7.0, 7.0, 8.0, 8.0, 8.0, 9.0, 9.0, 9.0, 9.0, + // 10.0, 10.0, 10.0, 11.0, 11.0, 11.0, 11.0, 12.0, 16.0, 2.0, 3.0, + // 5.0, 7.0, 9.0, 9.0, 10.0, 10.0, 10.0}; + // + // // testing dataset id:2 + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, + // 25, 25, 25, 25, 25, 25, 25, 50, 50, 50, 50, 50, 50, + // 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100}; + // std::vector LS = {16, 9, 15, 14, 13, 9, 10, 14, 10, 11, 14, 9, 14, + // 9, 13, 12, 10, 10, 11, 14, 11, 11, 14, 11, 10, 11, + // 10, 15, 7, 14, 11, 14, 12, 13, 12, 14, 11, 8, 10}; + // std::vector I = {1, 1, 2, 3, 3, 0, 2, 2, 1, 2, 4, 5, 6, 2, 6, 3, 1, 2, 4, 3, + // 4, 5, 5, 4, 5, 4, 5, 6, 2, 4, 6, 6, 8, 7, 8, 6, 6, 5, 4}; + // std::vector LSC = {1, 1, 2, 3, 3, 0, 2, 2, 1, 2, 4, 5, 6, 2, 6, 3, 1, 2, 4, 3, + // 4, 5, 5, 4, 5, 4, 5, 6, 2, 4, 6, 6, 8, 7, 8, 6, 6, 5, 4}; + // + // // testing dataset id:3 + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 0, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, + // 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, + // 500, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, + // 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, + // 1000, 1000, 1000, 1000, 1000, 2000, 2000, 2000, 2000, 2000, 2000, + // 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, + // 2000, 2000, 2000, 2000, 2000, 2000, 2000, 5000, 5000, 5000, 5000, + // 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, + // 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000}; + // std::vector LS = {6, 6, 5, 6, 2, 7, 5, 6, 6, 6, 6, 5, 5, 1, 3, 3, 6, 2, 8, 2, 4, + // 7, 5, 7, 5, 6, 4, 2, 8, 4, 4, 7, 4, 6, 8, 3, 5, 7, 6, 2, 7, 7, + // 7, 5, 6, 8, 4, 8, 2, 1, 5, 6, 2, 7, 1, 3, 5, 2, 4, 8, 5, 8, 5, + // 8, 7, 4, 5, 7, 3, 3, 3, 7, 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 8, + // 7, 5, 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 9, 8, 6, 5, 4, 5, 6, 7, 6, + // 7, 1, 2, 6, 4, 3, 5, 7, 5, 4, 5, 6, 7, 4, 6, 5, 1, 6, 3, 4}; + // std::vector I = {0, 2, 2, 0, 0, 3, 0, 2, 1, 0, 1, 1, 0, 0, 0, 1, 0, 2, 1, 1, 0, + // 0, 1, 1, 1, 1, 0, 0, 1, 2, 0, 3, 0, 2, 1, 0, 1, 0, 0, 0, 1, 2, + // 3, 1, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 2, 0, 3, 4, + // 0, 2, 1, 1, 2, 0, 1, 3, 1, 2, 0, 1, 1, 3, 2, 4, 2, 3, 4, 0, 5, + // 1, 1, 3, 2, 5, 0, 2, 5, 6, 3, 5, 5, 6, 7, 3, 1, 4, 4, 0, 6, 0, + // 7, 1, 2, 6, 4, 3, 4, 5, 5, 3, 5, 5, 7, 2, 4, 3, 1, 5, 1, 4}; + // std::vector LSC = + // {6.0, 13.0, 6.0, 7.0, 11.0, 12.0, 14.0, 12.0, 9.0, 9.0, 11.0, 7.0, + // 9.0, 13.0, 4.0, 13.0, 9.0, 6.0, 9.0, 5.0, 6.0, 7.0, 11.0, 9.0, + // 14.0, 7.0, 4.0, 2.0, 13.0, 12.0, 7.0, 7.0, 9.0, 9.0, 8.0, 14.0, + // 9.0, 7.0, 9.0, 9.0, 10.0, 7.0, 11.0, 5.0, 10.0, 10.0, 8.0, 14.0, + // 10.0, 13.0, 10.0, 14.0, 14.0, 8.0, 6.0, 3.0, 10.0, 9.0, 10.0, 9.0, + // 14.0, 8.0, 14.0, 13.0, 10.0, 14.0, 6.0, 12.0, 9.0, 7.0, 14.0, 11.0, + // 14.0, 9.0, 7.0, 11.0, 10.0, 14.0, 10.0, 8.0, 13.0, 11.0, 10.0, 13.0, + // 7.0, 6.0, 14.0, 6.0, 7.0, 14.0, 8.0, 12.0, 6.0, 10.0, 13.0, 12.0, + // 10.0, 11.0, 8.0, 6.0, 5.0, 14.0, 14.0, 13.0, 12.0, 9.0, 4.0, 13.0, + // 6.0, 12.0, 3.0, 7.0, 7.0, 10.0, 14.0, 11.0, 14.0, 7.0, 4.0, 8.0, + // 10.0, 13.0, 7.0, 10.0, 4.0}; + // + // // testing dataset id:4 + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + // 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + // 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}; + // std::vector LS = {17, 14, 9, 10, 12, 10, 10, 11, 10, 6, 7, 7, 15, 14, 10, 13, 12, + // 11, + // 12, 14, 15, 12, 11, 12, 12, 14, 12, 11, 13, 13, 12, 11, 12, 14, 9, + // 12, 9, 17, 13, 10, 12, 10, 8, 10, 4, 9, 9, 6, 4, 7, 13, 10, + // 13, 11}; + // std::vector I = {3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + // 2, 2, 3, 2, 3, 2, 4, 2, 4, 2, 3, 2, 2, 2, 2, 2, 2, 2, + // 2, 17, 9, 8, 12, 10, 8, 10, 4, 6, 9, 5, 4, 7, 3, 7, 10, 4}; + // std::vector LSC = {31.9, 29.2, 25.3, 26.3, 26.7, 27.8, 25.7, 27.5, 28.9, 27.4, 27.1, + // 26, 30.2, 28.9, 26.4, 24.9, 24.2, 26.9, 24.2, 26.9, 28.1, 30.6, + // 26.1, 29.3, 31.1, 28.1, 24.3, 25.6, 25.3, 27, 26.8, 26.7, 26.3, + // 26.8, 26.7, 26.8, 30.9, 30.1, 26.2, 25.6, 24.9, 25.5, 26.1, 25.7, + // 26.8, 28.1, 27.4, 25.2, 26.4, 26, 26.2, 27.5, 28.6, 25.5}; + // + // // testing dataset id:5; + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, + // 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, + // 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, + // 1000, 1000, 1000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, + // 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, + // 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, + // 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, + // 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, + // 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, + // 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, + // 5000, 5000, 5000, 5000, 5000, 5000, 5000}; + // std::vector LS = {6, 6, 5, 6, 2, 7, 5, 6, 6, 6, 6, 5, 5, 1, 3, 3, 6, 2, 8, 2, 4, 7, 5, + // 7, + // 5, 2, 6, 7, 7, 8, 4, 7, 5, 6, 7, 6, 2, 5, 1, 7, 7, 6, 8, 7, 7, 4, 3, + // 6, 3, 4, 7, 5, 6, 6, 8, 5, 8, 6, 7, 1, 5, 6, 2, 7, 1, 3, 5, 2, 4, 8, + // 5, 8, 5, 8, 7, 4, 5, 7, 3, 3, 3, 7, 6, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, + // 8, 7, 5, 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 9, 8, 6, 9, 7, 8, 7, 7, 6, 7, + // 5, 2, 6, 7, 7, 4, 3, 4, 7, 6, 5, 4, 5, 6, 7, 6, 7, 1, 2, 6, 4, 3, 5, + // 7, 5, 4, 5, 6, 7, 4, 6, 5, 1, 6, 3, 4, 6, 2, 6, 6, 6, 6, 7, 3, 6, 4, + // 1, 8, 3, 4}; + // std::vector I = {0, 6, 3, 0, 0, 5, 0, 3, 1, 0, 3, 1, 0, 0, 0, 1, 0, 2, 3, 1, 0, 0, 1, + // 1, + // 1, 0, 1, 3, 2, 1, 1, 1, 0, 3, 0, 2, 0, 1, 0, 5, 3, 5, 8, 2, 2, 0, 0, + // 3, 1, 1, 1, 0, 2, 5, 4, 1, 2, 3, 2, 0, 0, 3, 0, 0, 0, 1, 0, 2, 0, 2, + // 0, 8, 4, 0, 2, 3, 1, 2, 2, 1, 3, 2, 2, 2, 3, 3, 3, 2, 4, 2, 3, 4, 0, + // 5, 1, 1, 3, 2, 5, 0, 2, 5, 6, 3, 5, 5, 6, 7, 3, 0, 4, 0, 1, 4, 3, 1, + // 3, 2, 5, 5, 4, 1, 3, 2, 0, 3, 1, 4, 4, 0, 6, 0, 7, 1, 2, 6, 4, 3, 4, + // 5, 5, 3, 5, 5, 7, 2, 4, 3, 1, 5, 1, 4, 6, 1, 3, 5, 4, 2, 5, 1, 6, 4, + // 1, 0, 3, 4}; + // std::vector LSC = {6, 6, 5, 6, 2, 7, 5, 6, 6, 6, 6, 5, 5, 1, 3, 3, 6, 2, 8, 2, 4, 7, + // 5, 7, + // 5, 2, 6, 7, 7, 8, 4, 7, 5, 6, 7, 6, 2, 5, 1, 7, 7, 6, 8, 7, 7, 4, + // 3, 6, 3, 4, 7, 5, 6, 6, 8, 5, 8, 6, 7, 1, 5, 6, 2, 7, 1, 3, 5, 2, + // 4, 8, 5, 8, 5, 8, 7, 4, 5, 7, 3, 3, 3, 7, 6, 7, 7, 7, 7, 6, 6, 6, + // 6, 6, 6, 8, 7, 5, 5, 6, 5, 6, 6, 6, 6, 7, 7, 6, 9, 8, 6, 9, 7, 8, + // 7, 7, 6, 7, 5, 2, 6, 7, 7, 4, 3, 4, 7, 6, 5, 4, 5, 6, 7, 6, 7, 1, + // 2, 6, 4, 3, 5, 7, 5, 4, 5, 6, 7, 4, 6, 5, 1, 6, 3, 4, 6, 2, 6, 6, + // 6, 6, 7, 3, 6, 4, 1, 8, 3, 4}; + // + // // testing dataset id:6; + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, + // 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + // 100, 100, 100, 100, 100, 100, 250, 250, 250, 250, 250, 250, 250, 250, + // 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + // 250}; + // std::vector < double LS = {15, 17, 14, 14, 15, 15, 18, 12, 15, 15, 15, 19, 15, 16, 18, 18, 19, + // 13, + // 16, 13, 8, 14, 18, 15, 14, 14, 13, 16, 16, 15, 14, 16, 14, 14, 15, + // 16, 12, 16, 16, 1, 14, 18, 16, 16, 15, 15, 15, 12, 18, 16, 16, 15, + // 15, 17, 14, 15, 13, 15, 17, 16, 16, 11, 15, 12, 6, 6, 2, 18, 18, + // 12}; + // std::vector I = {0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, + // 0, + // 0, 2, 1, 1, 0, 0, 1, 0, 0, 3, 1, 1, 3, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, + // 0, 1, 2, 5, 1, 2, 0, 1, 0, 0, 0, 1, 1, 1, 3, 0, 1, 2, 0, 0, 2, 2, 4}; + // std::vector LSC = {15, 17, 14, 14, 15, 15, 18, 12, 15, 15, 15, 19, 15, 16, 18, 18, 19, + // 13, + // 16, 13, 8, 14, 18, 15, 14, 14, 13, 16, 16, 15, 14, 16, 14, 14, 15, + // 16, 12, 16, 16, 1, 14, 18, 16, 16, 15, 15, 15, 12, 18, 16, 16, 15, + // 15, 17, 14, 15, 13, 15, 17, 16, 16, 11, 15, 12, 6, 6, 2, 18, 18, + // 12}; + // + // // testing dataset id:7; + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 100, 100, 100, + // 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + // 100, 100, 100, 100, 100, 100, 250, 250, 250, 250, 250, 250, 250, 250, + // 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + // 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500}; + // std::vector < double LS = {15, 17, 14, 14, 15, 15, 18, 12, 15, 15, 15, 19, 15, 16, 18, 18, 19, + // 13, 16, 13, 8, 14, 18, 15, 14, 14, 13, 16, 16, 15, 14, 16, 14, 14, + // 15, 16, 12, 16, 16, 1, 14, 18, 16, 16, 15, 15, 15, 12, 18, 16, 16, + // 15, 15, 17, 14, 15, 13, 15, 17, 16, 16, 11, 15, 12, 6, 6, 2, 18, + // 18, 12, 5, 12, 5, 15, 12, 16, 9, 6, 6, 11, 2}; + // std::vector I = {0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, + // 1, 1, 0, 0, 2, 1, 1, 0, 0, 1, 0, 0, 3, 1, 1, 3, 2, 0, 0, 0, 0, + // 0, 1, 0, 1, 0, 0, 1, 2, 5, 1, 2, 0, 1, 0, 0, 0, 1, 1, 1, 3, 0, + // 1, 2, 0, 0, 2, 2, 4, 0, 0, 1, 2, 1, 0, 1, 0, 1, 0, 0}; + // std::vector LSC = {170, 160, 147, 153, 158, 153, 168, 165, 164, 166, 149, 174, 156, + // 160, + // 158, 161, 166, 172, 181, 177, 141, 144, 157, 161, 159, 153, 146, + // 167, 150, 159, 152, 165, 166, 158, 168, 143, 148, 177, 154, 153, + // 179, 171, 180, 170, 165, 157, 164, 162, 159, 160, 151, 141, 179, + // 150, 153, 175, 146, 161, 167, 165, 166, 162, 157, 153, 158, 166, + // 167, 146, 164, 155, 161, 158, 181, 159, 151, 152, 166, 176, 165, + // 144, 144}; + // + // // testing dataset id:8; + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 250, 250, + // 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + // 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 625, + // 625, 625, 625, 625, 625, 625, 625, 625, 625}; + // + // std::vector < double LS = {4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + // 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, + // 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4}; + // std::vector I = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, + // 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 3, 3, 0, 0, 1, 4, + // 2, 1, 2, 2, 4, 1, 3, 2, 2, 4, 3, 3, 4, 2, 4, 4, 3, 4, 4}; + // std::vector LSC = {12, 17, 12, 15, 18, 13, 16, 11, 13, 14, 11, 16, 12, 14, 14, + // 12, 15, 15, 13, 16, 16, 18, 11, 12, 14, 14, 16, 14, 14, 16, + // 10, 12, 15, 14, 13, 10, 14, 17, 15, 17, 15, 16, 11, 14, 15, + // 11, 13, 11, 12, 16, 15, 11, 11, 15, 12, 13, 19}; + // + // // testing dataset id:9; + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 250, 250, + // 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + // 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 625, + // 625, 625, 625, 625, 625, 625, 625, 625, 625}; + // std::vector < double LS = {4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + // 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, + // 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4}; + // std::vector I = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, + // 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 3, 3, 0, 0, 1, 4, + // 2, 1, 2, 2, 4, 1, 3, 2, 2, 4, 3, 3, 4, 2, 4, 4, 3, 4, 4}; + // std::vector LSC = {4, 5, 3, 6, 8, 8, 5, 7, 10, 6, 5, 12, 6, 7, 9, 7, 6, 10, 7, + // 8, 9, 11, 5, 10, 4, 9, 12, 6, 8, 9, 3, 7, 7, 9, 7, 4, 7, 12, + // 6, 9, 7, 7, 5, 6, 5, 6, 11, 7, 4, 9, 7, 8, 8, 10, 8, 9, 8}; + // + // // testing dataset id:10 + // std::vector D = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, + // 25, 25, 25, 25, 25, 25, 25, 50, 50, 50, 50, 50, 50, + // 50, 50, 50, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100}; + // std::vector LS = {16, 9, 15, 14, 13, 9, 10, 14, 10, 11, 14, 9, 14, + // 9, 13, 12, 10, 10, 11, 14, 11, 11, 14, 11, 10, 11, + // 10, 15, 7, 14, 11, 14, 12, 13, 12, 14, 11, 8, 10}; + // std::vector I = {1, 1, 2, 3, 3, 0, 2, 2, 1, 2, 4, 5, 6, 2, 6, 3, 1, 2, 4, 3, + // 4, 5, 5, 4, 5, 4, 5, 6, 2, 4, 6, 6, 8, 7, 8, 6, 6, 5, 4}; + // std::vector LSC = {16.0, 9.0, 15.0, 14.0, 13.0, 9.0, 10.0, 14.0, 10.0, 11.0, + // 14.0, 9.0, 14.0, 9.0, 13.0, 12.0, 10.0, 10.0, 11.0, 14.0, + // 11.0, 11.0, 14.0, 11.0, 10.0, 11.0, 10.0, 15.0, 7.0, 14.0, + // 11.0, 14.0, 12.0, 13.0, 12.0, 14.0, 11.0, 8.0, 10.0}; pyAnal.doses = D; pyAnal.litterSize = LS; From 249c02349cf032ef03f335992a2967e02fee1376 Mon Sep 17 00:00:00 2001 From: Cody Simmons Date: Tue, 12 Nov 2024 10:12:54 -0500 Subject: [PATCH 3/6] removed unused import --- tests/test_bmdscore/testNested.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_bmdscore/testNested.py b/tests/test_bmdscore/testNested.py index 4aa9b7b1..e7a45922 100644 --- a/tests/test_bmdscore/testNested.py +++ b/tests/test_bmdscore/testNested.py @@ -1,5 +1,3 @@ -import sys - import numpy as np import bmdscore From f3d3533b0ca1111a194d9ca3e6994a4ac03efc58 Mon Sep 17 00:00:00 2001 From: Cody Simmons Date: Tue, 12 Nov 2024 13:29:25 -0500 Subject: [PATCH 4/6] updated python priors for nlogistic model --- src/pybmds/types/priors.csv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pybmds/types/priors.csv b/src/pybmds/types/priors.csv index b8007589..e019424c 100644 --- a/src/pybmds/types/priors.csv +++ b/src/pybmds/types/priors.csv @@ -141,15 +141,15 @@ C,5,2,d,2,0,0.2501,0,18 C,5,2,rho,2,0,0.5,0,18 C,5,2,log-alpha,1,0,1,-18,18 ND,1,0,a,0,0,0,0,1 -ND,1,0,b,0,0,0,-1E+6,1E+6 +ND,1,0,b,0,0,0,-18,18 ND,1,0,theta1,0,0,0,0,1 -ND,1,0,theta2,0,0,0,-1E+6,1E+6 +ND,1,0,theta2,0,0,0,-18,18 ND,1,0,rho,0,0,0,0,18 ND,1,0,phi,0,0,0,0,1E+6 ND,1,1,a,0,0,0,0,1 -ND,1,1,b,0,0,0,-1E+6,1E+6 +ND,1,1,b,0,0,0,-18,18 ND,1,1,theta1,0,0,0,0,1 -ND,1,1,theta2,0,0,0,-1E+6,1E+6 +ND,1,1,theta2,0,0,0,-18,18 ND,1,1,rho,0,0,0,1,18 ND,1,1,phi,0,0,0,0,1E+6 ND,2,0,a,0,0,0,0,18 From bff8ac6e98f490789018317a0f97d7b358dbf1be Mon Sep 17 00:00:00 2001 From: Cody Simmons Date: Tue, 12 Nov 2024 13:39:27 -0500 Subject: [PATCH 5/6] updated pybmds tests for new nlogistic priors --- tests/test_pybmds/models/test_nested_dichotomous.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_pybmds/models/test_nested_dichotomous.py b/tests/test_pybmds/models/test_nested_dichotomous.py index 82173396..48c7ac02 100644 --- a/tests/test_pybmds/models/test_nested_dichotomous.py +++ b/tests/test_pybmds/models/test_nested_dichotomous.py @@ -25,9 +25,9 @@ def test_model_priors(self, nd_dataset): │ Parameter │ Initial │ Min │ Max │ ╞═════════════╪═══════════╪════════╪════════╡ │ a │ 0 │ 0 │ 1 │ - │ b │ 0 │ -1e+06 │ 1e+06 │ + │ b │ 0 │ -18 │ 18 │ │ theta1 │ 0 │ 0 │ 1 │ - │ theta2 │ 0 │ -1e+06 │ 1e+06 │ + │ theta2 │ 0 │ -18 │ 18 │ │ rho │ 0 │ 1 │ 18 │ │ phi1 │ 0 │ 0 │ 1e+06 │ │ phi2 │ 0 │ 0 │ 1e+06 │ @@ -46,9 +46,9 @@ def test_model_priors(self, nd_dataset): │ Parameter │ Initial │ Min │ Max │ ╞═════════════╪═══════════╪════════╪════════╡ │ a │ 0 │ 1 │ 2 │ - │ b │ 0 │ -1e+06 │ 1e+06 │ + │ b │ 0 │ -18 │ 18 │ │ theta1 │ 0 │ 0 │ 1 │ - │ theta2 │ 0 │ -1e+06 │ 1e+06 │ + │ theta2 │ 0 │ -18 │ 18 │ │ rho │ 0 │ 1 │ 18 │ │ phi1 │ 0 │ 0 │ 1e+06 │ │ phi2 │ 0 │ 5 │ 6 │ From e660c282112a55960fd7ba626d5e2e4a3a9c44df Mon Sep 17 00:00:00 2001 From: Andy Shapiro Date: Thu, 14 Nov 2024 11:39:22 -0500 Subject: [PATCH 6/6] update --- .../models/test_nested_dichotomous.py | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/test_pybmds/models/test_nested_dichotomous.py b/tests/test_pybmds/models/test_nested_dichotomous.py index 48c7ac02..b04ad5db 100644 --- a/tests/test_pybmds/models/test_nested_dichotomous.py +++ b/tests/test_pybmds/models/test_nested_dichotomous.py @@ -21,18 +21,18 @@ def test_model_priors(self, nd_dataset): m = nested_dichotomous.NestedLogistic(dataset=nd_dataset) expected = dedent( """ - ╒═════════════╤═══════════╤════════╤════════╕ - │ Parameter │ Initial │ Min │ Max │ - ╞═════════════╪═══════════╪════════╪════════╡ - │ a │ 0 │ 0 │ 1 │ - │ b │ 0 │ -18 │ 18 │ - │ theta1 │ 0 │ 0 │ 1 │ - │ theta2 │ 0 │ -18 │ 18 │ - │ rho │ 0 │ 1 │ 18 │ - │ phi1 │ 0 │ 0 │ 1e+06 │ - │ phi2 │ 0 │ 0 │ 1e+06 │ - │ phi3 │ 0 │ 0 │ 1e+06 │ - ╘═════════════╧═══════════╧════════╧════════╛ + ╒═════════════╤═══════════╤═══════╤════════╕ + │ Parameter │ Initial │ Min │ Max │ + ╞═════════════╪═══════════╪═══════╪════════╡ + │ a │ 0 │ 0 │ 1 │ + │ b │ 0 │ -18 │ 18 │ + │ theta1 │ 0 │ 0 │ 1 │ + │ theta2 │ 0 │ -18 │ 18 │ + │ rho │ 0 │ 1 │ 18 │ + │ phi1 │ 0 │ 0 │ 1e+06 │ + │ phi2 │ 0 │ 0 │ 1e+06 │ + │ phi3 │ 0 │ 0 │ 1e+06 │ + ╘═════════════╧═══════════╧═══════╧════════╛ """ ) assert m.priors_tbl() == expected.strip() @@ -42,18 +42,18 @@ def test_model_priors(self, nd_dataset): m.settings.priors.update("phi2", min_value=5, max_value=6) expected = dedent( """ - ╒═════════════╤═══════════╤════════╤════════╕ - │ Parameter │ Initial │ Min │ Max │ - ╞═════════════╪═══════════╪════════╪════════╡ - │ a │ 0 │ 1 │ 2 │ - │ b │ 0 │ -18 │ 18 │ - │ theta1 │ 0 │ 0 │ 1 │ - │ theta2 │ 0 │ -18 │ 18 │ - │ rho │ 0 │ 1 │ 18 │ - │ phi1 │ 0 │ 0 │ 1e+06 │ - │ phi2 │ 0 │ 5 │ 6 │ - │ phi3 │ 0 │ 0 │ 1e+06 │ - ╘═════════════╧═══════════╧════════╧════════╛ + ╒═════════════╤═══════════╤═══════╤════════╕ + │ Parameter │ Initial │ Min │ Max │ + ╞═════════════╪═══════════╪═══════╪════════╡ + │ a │ 0 │ 1 │ 2 │ + │ b │ 0 │ -18 │ 18 │ + │ theta1 │ 0 │ 0 │ 1 │ + │ theta2 │ 0 │ -18 │ 18 │ + │ rho │ 0 │ 1 │ 18 │ + │ phi1 │ 0 │ 0 │ 1e+06 │ + │ phi2 │ 0 │ 5 │ 6 │ + │ phi3 │ 0 │ 0 │ 1e+06 │ + ╘═════════════╧═══════════╧═══════╧════════╛ """ ) assert m.priors_tbl() == expected.strip()