Created
July 10, 2017 05:50
-
-
Save MikeLing/81d827cdbd811acbec54b0cbbefb6ea5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MacBook-Pro-2:build mikeling$ lldb ./bin/shogun-unit-test | |
| (lldb) target create "./bin/shogun-unit-test" | |
| Current executable set to './bin/shogun-unit-test' (x86_64). | |
| (lldb) b QuadraticTimeMMD_unittest.cc:364 | |
| Breakpoint 1: where = shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody() + 36 at QuadraticTimeMMD_unittest.cc:365, address = 0x000000010073c104 | |
| (lldb) r --gtest_filter=QuadraticTimeMMD.perform_test_permutation_unbiased_full | |
| Process 17168 launched: './bin/shogun-unit-test' (x86_64) | |
| Note: Google Test filter = QuadraticTimeMMD.perform_test_permutation_unbiased_full | |
| [==========] Running 1 test from 1 test case. | |
| [----------] Global test environment set-up. | |
| [----------] 1 test from QuadraticTimeMMD | |
| [ RUN ] QuadraticTimeMMD.perform_test_permutation_unbiased_full | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 | |
| frame #0: 0x000000010073c104 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:365 | |
| 362 const index_t dim=3; | |
| 363 | |
| 364 // use fixed seed | |
| -> 365 set_global_seed(1); | |
| 366 | |
| 367 float64_t difference=0.5; | |
| 368 | |
| (lldb) n | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c10e shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:367 | |
| 364 // use fixed seed | |
| 365 set_global_seed(1); | |
| 366 | |
| -> 367 float64_t difference=0.5; | |
| 368 | |
| 369 // streaming data generator for mean shift distributions | |
| 370 auto gen_p=some<CMeanShiftDataGenerator>(0, dim, 0); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c11c shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:370 | |
| 367 float64_t difference=0.5; | |
| 368 | |
| 369 // streaming data generator for mean shift distributions | |
| -> 370 auto gen_p=some<CMeanShiftDataGenerator>(0, dim, 0); | |
| 371 auto gen_q=some<CMeanShiftDataGenerator>(difference, dim, 0); | |
| 372 | |
| 373 // stream some data from generator | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c149 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:371 | |
| 368 | |
| 369 // streaming data generator for mean shift distributions | |
| 370 auto gen_p=some<CMeanShiftDataGenerator>(0, dim, 0); | |
| -> 371 auto gen_q=some<CMeanShiftDataGenerator>(difference, dim, 0); | |
| 372 | |
| 373 // stream some data from generator | |
| 374 CFeatures* feat_p=gen_p->get_streamed_features(m); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c16d shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:374 | |
| 371 auto gen_q=some<CMeanShiftDataGenerator>(difference, dim, 0); | |
| 372 | |
| 373 // stream some data from generator | |
| -> 374 CFeatures* feat_p=gen_p->get_streamed_features(m); | |
| 375 CFeatures* feat_q=gen_q->get_streamed_features(n); | |
| 376 | |
| 377 // shoguns kernel width is different | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c1b4 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:375 | |
| 372 | |
| 373 // stream some data from generator | |
| 374 CFeatures* feat_p=gen_p->get_streamed_features(m); | |
| -> 375 CFeatures* feat_q=gen_q->get_streamed_features(n); | |
| 376 | |
| 377 // shoguns kernel width is different | |
| 378 float64_t sigma=2; | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c1fb shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:378 | |
| 375 CFeatures* feat_q=gen_q->get_streamed_features(n); | |
| 376 | |
| 377 // shoguns kernel width is different | |
| -> 378 float64_t sigma=2; | |
| 379 float64_t sq_sigma_twice=sigma*sigma*2; | |
| 380 CGaussianKernel* kernel=new CGaussianKernel(10, sq_sigma_twice); | |
| 381 | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c209 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:379 | |
| 376 | |
| 377 // shoguns kernel width is different | |
| 378 float64_t sigma=2; | |
| -> 379 float64_t sq_sigma_twice=sigma*sigma*2; | |
| 380 CGaussianKernel* kernel=new CGaussianKernel(10, sq_sigma_twice); | |
| 381 | |
| 382 // create MMD instance, convienience constructor | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c217 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:380 | |
| 377 // shoguns kernel width is different | |
| 378 float64_t sigma=2; | |
| 379 float64_t sq_sigma_twice=sigma*sigma*2; | |
| -> 380 CGaussianKernel* kernel=new CGaussianKernel(10, sq_sigma_twice); | |
| 381 | |
| 382 // create MMD instance, convienience constructor | |
| 383 auto mmd=some<CQuadraticTimeMMD>(feat_p, feat_q); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c263 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:383 | |
| 380 CGaussianKernel* kernel=new CGaussianKernel(10, sq_sigma_twice); | |
| 381 | |
| 382 // create MMD instance, convienience constructor | |
| -> 383 auto mmd=some<CQuadraticTimeMMD>(feat_p, feat_q); | |
| 384 mmd->set_kernel(kernel); | |
| 385 | |
| 386 index_t num_null_samples=10; | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c279 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:384 | |
| 381 | |
| 382 // create MMD instance, convienience constructor | |
| 383 auto mmd=some<CQuadraticTimeMMD>(feat_p, feat_q); | |
| -> 384 mmd->set_kernel(kernel); | |
| 385 | |
| 386 index_t num_null_samples=10; | |
| 387 mmd->set_num_null_samples(num_null_samples); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c2ad shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:386 | |
| 383 auto mmd=some<CQuadraticTimeMMD>(feat_p, feat_q); | |
| 384 mmd->set_kernel(kernel); | |
| 385 | |
| -> 386 index_t num_null_samples=10; | |
| 387 mmd->set_num_null_samples(num_null_samples); | |
| 388 mmd->set_null_approximation_method(NAM_PERMUTATION); | |
| 389 | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c2b7 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:387 | |
| 384 mmd->set_kernel(kernel); | |
| 385 | |
| 386 index_t num_null_samples=10; | |
| -> 387 mmd->set_num_null_samples(num_null_samples); | |
| 388 mmd->set_null_approximation_method(NAM_PERMUTATION); | |
| 389 | |
| 390 // compute p-value using permutation for null distribution and | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c2e3 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:388 | |
| 385 | |
| 386 index_t num_null_samples=10; | |
| 387 mmd->set_num_null_samples(num_null_samples); | |
| -> 388 mmd->set_null_approximation_method(NAM_PERMUTATION); | |
| 389 | |
| 390 // compute p-value using permutation for null distribution and | |
| 391 // assert against local machine computed result | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c30b shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:392 | |
| 389 | |
| 390 // compute p-value using permutation for null distribution and | |
| 391 // assert against local machine computed result | |
| -> 392 mmd->set_statistic_type(ST_UNBIASED_FULL); | |
| 393 float64_t p_value=mmd->compute_p_value(mmd->compute_statistic()); | |
| 394 EXPECT_NEAR(p_value, 0.0, 1E-10); | |
| 395 } | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c333 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:393 | |
| 390 // compute p-value using permutation for null distribution and | |
| 391 // assert against local machine computed result | |
| 392 mmd->set_statistic_type(ST_UNBIASED_FULL); | |
| -> 393 float64_t p_value=mmd->compute_p_value(mmd->compute_statistic()); | |
| 394 EXPECT_NEAR(p_value, 0.0, 1E-10); | |
| 395 } | |
| 396 | |
| (lldb) s | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step in | |
| frame #0: 0x000000010072d0ec shogun-unit-test`shogun::Some<shogun::CQuadraticTimeMMD>::operator->(this=0x00007fff5fbff120) const at some.h:104 | |
| 101 template <typename T> | |
| 102 T* Some<T>::operator->() const | |
| 103 { | |
| -> 104 return raw; | |
| 105 } | |
| 106 template <class T> | |
| 107 T* Some<T>::get() const | |
| (lldb) n | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c33c shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:393 | |
| 390 // compute p-value using permutation for null distribution and | |
| 391 // assert against local machine computed result | |
| 392 mmd->set_statistic_type(ST_UNBIASED_FULL); | |
| -> 393 float64_t p_value=mmd->compute_p_value(mmd->compute_statistic()); | |
| 394 EXPECT_NEAR(p_value, 0.0, 1E-10); | |
| 395 } | |
| 396 | |
| (lldb) s | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step in | |
| frame #0: 0x000000010072d0ec shogun-unit-test`shogun::Some<shogun::CQuadraticTimeMMD>::operator->(this=0x00007fff5fbff120) const at some.h:104 | |
| 101 template <typename T> | |
| 102 T* Some<T>::operator->() const | |
| 103 { | |
| -> 104 return raw; | |
| 105 } | |
| 106 template <class T> | |
| 107 T* Some<T>::get() const | |
| (lldb) n | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c369 shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:393 | |
| 390 // compute p-value using permutation for null distribution and | |
| 391 // assert against local machine computed result | |
| 392 mmd->set_statistic_type(ST_UNBIASED_FULL); | |
| -> 393 float64_t p_value=mmd->compute_p_value(mmd->compute_statistic()); | |
| 394 EXPECT_NEAR(p_value, 0.0, 1E-10); | |
| 395 } | |
| 396 | |
| (lldb) s | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step in | |
| frame #0: 0x00000001041347ee libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:314 | |
| 311 | |
| 312 float64_t CQuadraticTimeMMD::compute_statistic() | |
| 313 { | |
| -> 314 SG_DEBUG("Entering\n"); | |
| 315 REQUIRE(get_kernel(), "Kernel is not set!\n"); | |
| 316 | |
| 317 self->init_statistic_job(); | |
| (lldb) n | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134840 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:315 | |
| 312 float64_t CQuadraticTimeMMD::compute_statistic() | |
| 313 { | |
| 314 SG_DEBUG("Entering\n"); | |
| -> 315 REQUIRE(get_kernel(), "Kernel is not set!\n"); | |
| 316 | |
| 317 self->init_statistic_job(); | |
| 318 self->init_kernel(); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134898 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:317 | |
| 314 SG_DEBUG("Entering\n"); | |
| 315 REQUIRE(get_kernel(), "Kernel is not set!\n"); | |
| 316 | |
| -> 317 self->init_statistic_job(); | |
| 318 self->init_kernel(); | |
| 319 | |
| 320 float64_t statistic=0; | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x00000001041348cf libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:318 | |
| 315 REQUIRE(get_kernel(), "Kernel is not set!\n"); | |
| 316 | |
| 317 self->init_statistic_job(); | |
| -> 318 self->init_kernel(); | |
| 319 | |
| 320 float64_t statistic=0; | |
| 321 if (self->precompute) | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x00000001041348fd libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:320 | |
| 317 self->init_statistic_job(); | |
| 318 self->init_kernel(); | |
| 319 | |
| -> 320 float64_t statistic=0; | |
| 321 if (self->precompute) | |
| 322 { | |
| 323 SGMatrix<float32_t> kernel_matrix=self->get_kernel_matrix(); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134905 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:321 | |
| 318 self->init_kernel(); | |
| 319 | |
| 320 float64_t statistic=0; | |
| -> 321 if (self->precompute) | |
| 322 { | |
| 323 SGMatrix<float32_t> kernel_matrix=self->get_kernel_matrix(); | |
| 324 statistic=self->statistic_job(kernel_matrix); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134935 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:323 | |
| 320 float64_t statistic=0; | |
| 321 if (self->precompute) | |
| 322 { | |
| -> 323 SGMatrix<float32_t> kernel_matrix=self->get_kernel_matrix(); | |
| 324 statistic=self->statistic_job(kernel_matrix); | |
| 325 | |
| 326 SG_PRINT("kernel_matrix is"); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134974 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:324 | |
| 321 if (self->precompute) | |
| 322 { | |
| 323 SGMatrix<float32_t> kernel_matrix=self->get_kernel_matrix(); | |
| -> 324 statistic=self->statistic_job(kernel_matrix); | |
| 325 | |
| 326 SG_PRINT("kernel_matrix is"); | |
| 327 kernel_matrix.display_matrix(); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x00000001041349c6 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:326 | |
| 323 SGMatrix<float32_t> kernel_matrix=self->get_kernel_matrix(); | |
| 324 statistic=self->statistic_job(kernel_matrix); | |
| 325 | |
| -> 326 SG_PRINT("kernel_matrix is"); | |
| 327 kernel_matrix.display_matrix(); | |
| 328 } | |
| 329 else | |
| (lldb) | |
| kernel_matrix isProcess 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134a10 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:327 | |
| 324 statistic=self->statistic_job(kernel_matrix); | |
| 325 | |
| 326 SG_PRINT("kernel_matrix is"); | |
| -> 327 kernel_matrix.display_matrix(); | |
| 328 } | |
| 329 else | |
| 330 { | |
| (lldb) | |
| matrix=[ | |
| [ 1, 0.556699514389038086, 0.368323266506195068, 0.0758996829390525818, 0.130813091993331909, 0.0826741680502891541, 0.00974852778017520905, 0.0697323828935623169, 0.157904252409934998, 0.0738679692149162292, 0.148431688547134399, 0.0479568019509315491, 0.118760667741298676, 0.0932688117027282715, 0.178006604313850403, 0.0432566516101360321, 0.00809305254369974136, 0.221199974417686462, 0.073198169469833374, 0.00216444744728505611, 0.969233214855194092, 0.546305954456329346, 0.394336700439453125, 0.0781961232423782349, 0.11621103435754776, 0.084164448082447052, 0.0166588779538869858, 0.077898077666759491, 0.177793562412261963, 0.072491966187953949, 0.18761560320854187, 0.0476853661239147186,0.128446325659751892, 0.0937686190009117126, 0.198463067412376404, 0.049128703773021698, 0.00845495052635669708, 0.268364250659942627, 0.0824361220002174377, 0.00314290588721632957, 0.225547656416893005, 0.180518895387649536, 0.0525216720998287201, 0.0188444964587688446, 0.0215831957757472992, 0.0955503210425376892, 0.276968777179718018, 0.067553989589214325, 0.214781522750854492, 0.00428031804040074348], | |
| [ 0.556699514389038086, 1, 0.791347026824951172, 0.488162249326705933, 0.609118103981018066, 0.406760722398757935, 0.0542886443436145782, 0.420213699340820312, 0.488001227378845215, 0.470727235078811646, 0.508211433887481689, 0.326791077852249146, 0.591633796691894531, 0.529971539974212646, 0.644554376602172852, 0.330830425024032593, 0.1015491783618927, 0.642365097999572754, 0.429332554340362549, 0.0320892706513404846, 0.532920420169830322, 0.969233214855194092, 0.836793363094329834, 0.496732592582702637, 0.534454703330993652, 0.408988475799560547, 0.0916281566023826599,0.463634401559829712, 0.54269564151763916, 0.456264078617095947, 0.634453773498535156, 0.320935934782028198, 0.631997287273406982, 0.526243627071380615, 0.709767937660217285, 0.371108651161193848, 0.10478239506483078, 0.76972353458404541, 0.477556079626083374, 0.0460211411118507385, 0.743889093399047852, 0.720730245113372803, 0.397873133420944214, 0.170070663094520569, 0.120899304747581482, 0.498468399047851562, 0.797149121761322021, 0.373838335275650024, 0.756455421447753906, 0.0764571800827980042], | |
| [ 0.368323266506195068, 0.791347026824951172, 1, 0.539546430110931396, 0.439181864261627197, 0.225226327776908875, 0.100739613175392151, 0.629095077514648438, 0.292172402143478394, 0.359978616237640381, 0.681072533130645752, 0.195348918437957764, 0.548155725002288818, 0.412241667509078979, 0.877729356288909912, 0.31413152813911438, 0.0595337674021720886, 0.738658368587493896, 0.640114903450012207, 0.0339710153639316559, 0.323182404041290283, 0.703027486801147461, 0.969233214855194092, 0.503227472305297852, 0.353208214044570923, 0.207571759819984436, 0.155846580862998962, 0.636207461357116699, 0.297818481922149658, 0.319816350936889648, 0.779338181018829346, 0.175847485661506653, 0.536714375019073486, 0.375200331211090088, 0.885919928550720215, 0.322986364364624023, 0.0563056953251361847, 0.811285078525543213, 0.652627706527709961, 0.0446563363075256348, 0.856557071208953857, 0.549689292907714844, 0.349181979894638062, 0.109369359910488129, 0.14050726592540741, 0.308730959892272949, 0.639535367488861084, 0.314331740140914917, 0.529235780239105225, 0.0583169981837272644], | |
| [ 0.0758996829390525818, 0.488162249326705933, 0.539546430110931396, 1, 0.76912456750869751, 0.517619490623474121, 0.121217899024486542, 0.888636291027069092, 0.39780813455581665, 0.853632748126983643, 0.590350151062011719, 0.594458401203155518, 0.891103982925415039, 0.860458195209503174, 0.779579877853393555, 0.791857719421386719, 0.35059744119644165, 0.597445249557495117, 0.882921218872070312, 0.165176317095756531, 0.0692072063684463501, 0.450673818588256836, 0.5434378981590271, 0.969233214855194092, 0.642800033092498779, 0.495738357305526733, 0.194875180721282959, 0.933897793292999268, 0.421384871006011963, 0.78811180591583252, 0.701996684074401855, 0.556082725524902344, 0.906693458557128906, 0.813830435276031494, 0.817687332630157471, 0.846082329750061035, 0.344580352306365967, 0.681900143623352051, 0.935453832149505615, 0.225639522075653076, 0.778528392314910889, 0.791342079639434814, 0.889924347400665283, 0.432172983884811401, 0.232653379440307617, 0.677454113960266113, 0.650843024253845215, 0.621627748012542725, 0.722185492515563965, 0.411206364631652832], | |
| [ 0.130813091993331909, 0.609118103981018066, 0.439181864261627197, 0.76912456750869751, 1, 0.623861908912658691, 0.0325214490294456482, 0.514707505702972412, 0.425335794687271118, 0.870515644550323486, 0.330850124359130859, 0.673049330711364746, 0.732549369335174561, 0.853936553001403809, 0.521709918975830078, 0.552097082138061523, 0.333949357271194458, 0.399963974952697754, 0.508495688438415527, 0.0658074617385864258, 0.138328507542610168, 0.652151882648468018, 0.51299673318862915, 0.864518105983734131, 0.969233214855194092, 0.692914187908172607, 0.0606329627335071564,0.627313852310180664, 0.522499978542327881, 0.932056963443756104, 0.456253081560134888, 0.730153143405914307, 0.86440664529800415, 0.936653256416320801, 0.634607017040252686, 0.684116482734680176, 0.380637407302856445, 0.529410600662231445, 0.624793946743011475, 0.104253731667995453, 0.58153831958770752, 0.980718076229095459, 0.885426521301269531, 0.374589979648590088, 0.0990004986524581909, 0.959143996238708496, 0.632902264595031738, 0.458840727806091309, 0.839815378189086914, 0.316513687372207642], | |
| ...... | |
| [ 0.00428031804040074348, 0.0764571800827980042, 0.0583169981837272644, 0.411206364631652832, 0.316513687372207642, 0.483096182346343994, 0.059734731912612915, 0.249413609504699707, 0.248296782374382019, 0.569399058818817139, 0.14309382438659668, 0.661520898342132568, 0.415431410074234009, 0.520817220211029053, 0.145485922694206238, 0.637516319751739502, 0.886068403720855713, 0.141250893473625183, 0.246877983212471008, 0.411087661981582642, 0.003835636656731367110.0693691596388816833, 0.0577253140509128571, 0.391686111688613892, 0.259969115257263184, 0.454700589179992676, 0.0943771228194236755, 0.257599771022796631, 0.258479684591293335, 0.516634702682495117, 0.167223125696182251, 0.608151257038116455, 0.415414333343505859, 0.484104961156845093, 0.149967670440673828, 0.669432520866394043, 0.855852723121643066, 0.158439651131629944, 0.257059007883071899, 0.551889121532440186, 0.172878146171569824, 0.267663240432739258, 0.505120694637298584, 0.759443759918212891, 0.184104502201080322, 0.393633812665939331, 0.213005855679512024, 0.474328488111495972, 0.300322115421295166, 1] | |
| ] | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134a2f libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:328 | |
| 325 | |
| 326 SG_PRINT("kernel_matrix is"); | |
| 327 kernel_matrix.display_matrix(); | |
| -> 328 } | |
| 329 else | |
| 330 { | |
| 331 auto kernel=get_kernel(); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134b69 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:338 | |
| 335 statistic=self->statistic_job(kernel_functor); | |
| 336 } | |
| 337 | |
| -> 338 SG_PRINT("statistic before normalization is %f\n", statistic); | |
| 339 statistic=normalize_statistic(statistic); | |
| 340 SG_PRINT("statistic after normalization is %f\n", statistic); | |
| 341 | |
| (lldb) | |
| statistic before normalization is -0.023781 | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134b83 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:339 | |
| 336 } | |
| 337 | |
| 338 SG_PRINT("statistic before normalization is %f\n", statistic); | |
| -> 339 statistic=normalize_statistic(statistic); | |
| 340 SG_PRINT("statistic after normalization is %f\n", statistic); | |
| 341 | |
| 342 SG_PRINT("Leaving\n"); | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134bc9 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:340 | |
| 337 | |
| 338 SG_PRINT("statistic before normalization is %f\n", statistic); | |
| 339 statistic=normalize_statistic(statistic); | |
| -> 340 SG_PRINT("statistic after normalization is %f\n", statistic); | |
| 341 | |
| 342 SG_PRINT("Leaving\n"); | |
| 343 return statistic; | |
| (lldb) | |
| statistic after normalization is -0.285367 | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134c03 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:342 | |
| 339 statistic=normalize_statistic(statistic); | |
| 340 SG_PRINT("statistic after normalization is %f\n", statistic); | |
| 341 | |
| -> 342 SG_PRINT("Leaving\n"); | |
| 343 return statistic; | |
| 344 } | |
| 345 | |
| (lldb) | |
| Leaving | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104134c15 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_statistic(this=0x000000010b211e50) at QuadraticTimeMMD.cpp:343 | |
| 340 SG_PRINT("statistic after normalization is %f\n", statistic); | |
| 341 | |
| 342 SG_PRINT("Leaving\n"); | |
| -> 343 return statistic; | |
| 344 } | |
| 345 | |
| 346 SGVector<float64_t> CQuadraticTimeMMD::Self::sample_null_permutation() | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x000000010073c38b shogun-unit-test`QuadraticTimeMMD_perform_test_permutation_unbiased_full_Test::TestBody(this=0x000000010b20eb50) at QuadraticTimeMMD_unittest.cc:393 | |
| 390 // compute p-value using permutation for null distribution and | |
| 391 // assert against local machine computed result | |
| 392 mmd->set_statistic_type(ST_UNBIASED_FULL); | |
| -> 393 float64_t p_value=mmd->compute_p_value(mmd->compute_statistic()); | |
| 394 EXPECT_NEAR(p_value, 0.0, 1E-10); | |
| 395 } | |
| 396 | |
| (lldb) s | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step in | |
| frame #0: 0x0000000104137df8 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_p_value(this=0x000000010b211e50, statistic=-0.28536732494831085) at QuadraticTimeMMD.cpp:540 | |
| 537 | |
| 538 float64_t CQuadraticTimeMMD::compute_p_value(float64_t statistic) | |
| 539 { | |
| -> 540 REQUIRE(get_kernel(), "Kernel is not set!\n"); | |
| 541 float64_t result=0; | |
| 542 switch (get_null_approximation_method()) | |
| 543 { | |
| (lldb) n | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104137e50 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_p_value(this=0x000000010b211e50, statistic=-0.28536732494831085) at QuadraticTimeMMD.cpp:541 | |
| 538 float64_t CQuadraticTimeMMD::compute_p_value(float64_t statistic) | |
| 539 { | |
| 540 REQUIRE(get_kernel(), "Kernel is not set!\n"); | |
| -> 541 float64_t result=0; | |
| 542 switch (get_null_approximation_method()) | |
| 543 { | |
| 544 case NAM_MMD2_GAMMA: | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104137e58 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_p_value(this=0x000000010b211e50, statistic=-0.28536732494831085) at QuadraticTimeMMD.cpp:542 | |
| 539 { | |
| 540 REQUIRE(get_kernel(), "Kernel is not set!\n"); | |
| 541 float64_t result=0; | |
| -> 542 switch (get_null_approximation_method()) | |
| 543 { | |
| 544 case NAM_MMD2_GAMMA: | |
| 545 { | |
| (lldb) | |
| Process 17168 stopped | |
| * thread #1, queue = 'com.apple.main-thread', stop reason = step over | |
| frame #0: 0x0000000104137f57 libshogun.18.dylib`shogun::CQuadraticTimeMMD::compute_p_value(this=0x000000010b211e50, statistic=-0.28536732494831085) at QuadraticTimeMMD.cpp:551 | |
| 548 break; | |
| 549 } | |
| 550 default: | |
| -> 551 result=CHypothesisTest::compute_p_value(statistic); | |
| 552 break; | |
| 553 } | |
| 554 return result; | |
| (lldb) | |
| vector in values isvector=[0.260531611740589142,0.260531611740589142,0.260531611740589142,0.260531611740589142,0.260531611740589142,0.260531611740589142,0.260531611740589142,0.260531611740589142,0.260531611740589142,0.260531611740589142] | |
| values of i is 0.000000 (which is result | |
| Process 17168 stopped |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment