Skip to content

Commit

Permalink
speed things up
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Jul 3, 2012
1 parent 665be2b commit cf13270
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -64,7 +64,7 @@ def statistics_linear_time_mmd():

print "computing p-value using bootstrapping"
mmd.set_null_approximation_method(BOOTSTRAP)
mmd.set_bootstrap_iterations(500)
mmd.set_bootstrap_iterations(50) # normally, far more iterations are needed
p_value=mmd.compute_p_value(statistic)
print "p_value:", p_value
print "p_value <", alpha, ", i.e. test sais p!=q:", p_value<alpha
Expand All @@ -78,7 +78,7 @@ def statistics_linear_time_mmd():
# sample from null distribution (these may be plotted or whatsoever)
# mean should be close to zero, variance stronly depends on data/kernel
mmd.set_null_approximation_method(BOOTSTRAP)
mmd.set_bootstrap_iterations(100)
mmd.set_bootstrap_iterations(10) # normally, far more iterations are needed
null_samples=mmd.bootstrap_null()
print "null mean:", mean(null_samples)
print "null variance:", var(null_samples)
Expand Down
Expand Up @@ -96,7 +96,7 @@ def statistics_linear_time_mmd():
mmd.set_null_approximation_method(MMD2_SPECTRUM)
mmd.set_statistic_type(BIASED)
# 200 samples using 100 eigenvalues
null_samples=mmd.sample_null_spectrum(200,100)
null_samples=mmd.sample_null_spectrum(50,10)
print "null mean:", mean(null_samples)
print "null variance:", var(null_samples)

Expand Down

0 comments on commit cf13270

Please sign in to comment.