[pymvpa] zscore clarification and question

Yaroslav Halchenko debian at onerussian.com
Wed Dec 1 15:12:52 UTC 2010

thank you Jo for kicking my butt for stopping checking my words in the
code ("Talk is cheap show me your code" L. Torvalds)

you are perfectly correct and I guess we do not have zscoring per
volume atm... sorry for causing you to explain it in detail for us.
Theoretically it should be just "axis" argument to make things clear and
explicit (will be done in 0.6 I guess):
0 - per feature (as now pervoxel=True)
1 - per volume
None - global (as now pervoxel=False)

so we do not forget ;)

On Wed, 01 Dec 2010, J.A. Etzel wrote:
> The thread-hijacking was inadvertent, I assure you! :)

> It's still not clear to me that setting pervoxel=False will work.

> From http://www.scipy.org/Numpy_Example_List#mean the axis argument
> determines whether the mean is calculated over all values in the
> array, for each row, or for each column. myDataset.samples is a 2d
> array (volumes x voxels). In the /mvpa/datasets/miscfx.py zscore
> method (which I think is the code used when calling
> zscore(myDataset)) the axis argument is set to {} when pervoxel is
> false, which calculates a single mean for the entire array. When
> pervoxel is true the axis argument is set to 0, which calculates the
> mean for each column in the dataset.samples. I think for row-wise
> scaling the argument would need to be 1, to calculate the mean and
> standard deviation row-wise.

Keep in touch                                     www.onerussian.com
Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic

More information about the Pkg-ExpPsy-PyMVPA mailing list