Skip to content

Commit

Permalink
added more tests, fixed more bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
lambday authored and karlnapf committed Jul 4, 2016
1 parent 2fd310f commit 736d8f7
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 530 deletions.
2 changes: 1 addition & 1 deletion src/shogun/statistical_testing/QuadraticTimeMMD.cpp
Expand Up @@ -442,7 +442,7 @@ SGVector<float64_t> CQuadraticTimeMMD::spectrum_sample_null()
* K is matrix for XX, L is matrix for YY, KL is XY, LK is YX
* works since X and Y are concatenated here */
SGMatrix<float64_t> precomputed_km=self->get_kernel_matrix();
SGMatrix<float64_t> K(precomputed_km.matrix, precomputed_km.num_rows, precomputed_km.num_cols);
SGMatrix<float64_t> K(precomputed_km.num_rows, precomputed_km.num_cols);
std::copy(precomputed_km.matrix, precomputed_km.matrix+precomputed_km.num_rows*precomputed_km.num_cols, K.matrix);

/* center matrix K=H*K*H */
Expand Down
Expand Up @@ -45,7 +45,7 @@ float64_t UnbiasedIncomplete::operator()(SGMatrix<float64_t> km)
Block& b_xy = map.block(n, 0, n, n);
auto term_3 = b_xy.sum() - b_xy.diagonal().sum();

auto statistic = term_1/n/(n-1) + term_2/n/(n-1) - 2*term_3/n/n;
auto statistic = term_1/n/(n-1) + term_2/n/(n-1) - 2*term_3/n/(n-1);

return statistic;

Expand Down

0 comments on commit 736d8f7

Please sign in to comment.