[Pkg-exppsy-maintainers] States Rock! and Question

Yaroslav Halchenko debian at onerussian.com
Thu Dec 6 04:08:33 UTC 2007


>    I just updated the PLF code to make use of the states.  It's exactly
>    what I wanted in there, thanks!
That is great that you like it!

>    I'd like to add in my mahalanobis distance function.  Any suggestions
>    as to where I put it?  I was thinking either in mvpa.misc.stats or
>    mvpa.algorithms, but I'm not sure where is best.
what do you use as the relation matrix for Mahalanobis distance (if that
is not a secret spice ;-))?

at some moment we decided that all neighborhood information is provided
by a MetricMapper (and MaskMapper is such iirc).
For Mahalanobis distance I guess you would need to create a distance
function and create a DescreteMetric which you would use to parametrize
MaskMapper constructor. See smth like
tests/test_mask{mapper,eddataset}.py I guess.
Actually I just adjusted MaskMapper to be a bit easier to accept your
new distance: you can simply provide distance_function parameter to get
it to the right one. Please see/merge my branch on alioth to get it.

New distance function should belong to mvpa.datasets.metric I
guess. In case of Mahalanobis distance it must be  a functor class I
guess since it is parametrized with a matrix. But besides that it is
simple -- just another distance_function I guess.

The only issue I see now, but I don't want to jump on is that
NiftiDataset assumes cartesianDistance but we can either parametrize
constructor there or let you simply override the mapper's metric (see in
NiftiDataset.__init__ for the example ;-)) later on

>    Eventually I'd like to run searchlights that use the mahalanobis
>    distance as the measure of choice.
Interesting example ;)
-- 
Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Student  Ph.D. @ CS Dept. NJIT
Office: (973) 353-5440x263 | FWD: 82823 | Fax: (973) 353-1171
        101 Warren Str, Smith Hall, Rm 4-105, Newark NJ 07102
WWW:     http://www.linkedin.com/in/yarik        



More information about the Pkg-exppsy-maintainers mailing list