Home | Trees | Indices | Help |
|
---|
|
1 # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- 2 # vi: set ft=python sts=4 ts=4 sw=4 et: 3 ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## 4 # 5 # See COPYING file distributed along with the PyMVPA package for the 6 # copyright and license terms. 7 # 8 ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## 9 10 __docformat__ = 'restructuredtext' 11 12 import numpy as N 13 14 from mvpa.measures.base import FeaturewiseDatasetMeasure 15 16 if __debug__: 17 from mvpa.base import debug 18 1952 5522 # init base classes first 23 FeaturewiseDatasetMeasure.__init__(self, **kwargs) 24 25 # save the args for the analysis 26 self.num_permutations = num_permutations 27 self.num_bootstraps = num_bootstraps2830 # take mean within condition(label) and concat to make a 31 # condition by features matrix 32 X = [] 33 for ul in N.unique(labels): 34 X.append(mat[labels==ul].mean(axis=0)) 35 X = N.asarray(X) 36 37 # center each condition by subtracting the grand mean 38 X -= X.mean(axis=1)[:,N.newaxis].repeat(X.shape[1],axis=1) 39 40 # run SVD (checking to transpose if necessary) 41 U,s,Vh = N.linalg.svd(X, full_matrices=0)42 43 # run procrust to reorder if necessary 44 47
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Apr 23 23:09:46 2012 | http://epydoc.sourceforge.net |