Skip to content

Commit

Permalink
handle negative mmd values in max ratio kernel selection
Browse files Browse the repository at this point in the history
  • Loading branch information
lambday committed Aug 20, 2016
1 parent 5b47724 commit f2bbc3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shogun/statistical_testing/internals/mmd/VarianceH1.h
Expand Up @@ -233,6 +233,9 @@ struct VarianceH1
}
auto var_est=compute_variance_estimate();
auto mmd_est=compute_mmd_job(kernel_functor);
// TODO comfirm the theory
if (mmd_est<0)
mmd_est=0;
result[k]=var_est/CMath::sqrt(mmd_est+m_lambda);
}

Expand Down

0 comments on commit f2bbc3f

Please sign in to comment.