[med-svn] [python-mne] 293/376: adding verbose option

Yaroslav Halchenko debian at onerussian.com
Fri Nov 27 17:23:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

yoh pushed a commit to annotated tag v0.1
in repository python-mne.

commit bfad91060c963ef8a0106543b4cf43a7c076e45f
Author: Alexandre Gramfort <alexandre.gramfort at inria.fr>
Date:   Wed Jun 8 11:23:05 2011 -0400

    adding verbose option
---
 mne/stats/cluster_level.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mne/stats/cluster_level.py b/mne/stats/cluster_level.py
index ae08ae7..c1bda6c 100644
--- a/mne/stats/cluster_level.py
+++ b/mne/stats/cluster_level.py
@@ -125,7 +125,7 @@ def _pval_from_histogram(T, H0, tail):
 
 def permutation_cluster_test(X, stat_fun=f_oneway, threshold=1.67,
                              n_permutations=1000, tail=0,
-                             connectivity=None):
+                             connectivity=None, verbose=True):
     """Cluster-level statistical permutation test
 
     For a list of 2d-arrays of data, e.g. power values, calculate some
@@ -154,6 +154,8 @@ def permutation_cluster_test(X, stat_fun=f_oneway, threshold=1.67,
         Defines connectivity between features. The matrix is assumed to
         be symmetric and only the upper triangular half is used.
         Defaut is None, i.e, no connectivity.
+    verbose: boolean
+        If True print some text.
 
     Returns
     -------
@@ -198,6 +200,8 @@ def permutation_cluster_test(X, stat_fun=f_oneway, threshold=1.67,
     if len(clusters) > 0:
         H0 = np.zeros(n_permutations)  # histogram
         for i_s in range(n_permutations):
+            if verbose:
+                print "Permutation %d / %d" % (i_s + 1, n_permutations) 
             np.random.shuffle(X_full)
             X_shuffle_list = [X_full[s] for s in slices]
             T_obs_surr = stat_fun(*X_shuffle_list)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-mne.git



More information about the debian-med-commit mailing list