15 using namespace shogun;
30 SG_ERROR(
"CQuadraticTimeMMD: Only features with equal number of vectors "
31 "are currently possible\n");
42 SG_ERROR(
"CQuadraticTimeMMD: Only features with equal number of vectors "
43 "are currently possible\n");
52 void CQuadraticTimeMMD::init()
55 " for spectrum method null-distribution approximation",
58 " Eigenvalues for spectrum method null-distribution approximation",
105 return first+second-third;
143 return first+second-third;
161 SG_ERROR(
"CQuadraticTimeMMD::compute_statistic(): Unknown statistic "
185 SG_ERROR(
"CQuadraticTimeMMD::compute_p_value(): Only possible if "
186 "shogun is compiled with LAPACK enabled\n");
187 #endif // HAVE_LAPACK
222 SG_ERROR(
"CQuadraticTimeMMD::compute_threshold(): Only possible if "
223 "shogun is compiled with LAPACK enabled\n");
224 #endif // HAVE_LAPACK
252 SG_ERROR(
"%s::sample_null_spectrum(): Currently, only equal "
253 "sample sizes are supported\n",
get_name());
258 SG_ERROR(
"%s::sample_null_spectrum(): Number of samples has to be at"
259 " least 2, better in the hundrets",
get_name());
264 SG_ERROR(
"%s::sample_null_spectrum(): Number of Eigenvalues too large\n",
268 if (num_eigenvalues<1)
270 SG_ERROR(
"%s::sample_null_spectrum(): Number of Eigenvalues too small\n",
277 SG_WARNING(
"%s::sample_null_spectrum(): Note: provided statistic has "
278 "to be BIASED. Please ensure that! To get rid of warning,"
279 "call %s::set_statistic_type(BIASED)\n",
get_name(),
298 for (
index_t i=0; i<num_eigenvalues; ++i)
304 for (
index_t i=0; i<num_samples; ++i)
316 #endif // HAVE_LAPACK
322 SG_ERROR(
"%s::compute_p_value_gamma(): Currently, only equal "
323 "sample sizes are supported\n",
get_name());
329 SG_WARNING(
"%s::compute_p_value(): Note: provided statistic has "
330 "to be BIASED. Please ensure that! To get rid of warning,"
331 "call %s::set_statistic_type(BIASED)\n",
get_name(),
351 mean_mmd=2.0/m_q_start*(1.0-1.0/m_q_start*mean_mmd);
362 if (i==j || m_q_start+i==j || m_q_start+j==i)
372 var_mmd*=2.0/m_q_start/(m_q_start-1)*1.0/m_q_start/(m_q_start-1);
376 float64_t b=var_mmd*m_q_start / mean_mmd;
386 num_samples_spectrum)
392 index_t num_eigenvalues_spectrum)