<div dir="ltr">I guess you have invariant features in your dataset, therefore you will get problems when trying to divide by 0. There is a function to remove them. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 16, 2016 at 8:01 PM, Liang, Guangsheng <span dir="ltr"><<a href="mailto:guangsheng.liang@ttu.edu" target="_blank">guangsheng.liang@ttu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div>
<p class="MsoNormal">Hello PyMVPA community,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am currently working on a fMRI data applying an ENET classifier.
<u></u><u></u></p>
<p class="MsoNormal">My PyMVPA is running under Linux environment, with python 2.7.12.
<u></u><u></u></p>
<p class="MsoNormal">The design of the data is a repeated measurement with pre and post conditions.  <u></u><u></u></p>
<p class="MsoNormal">In my understanding, in my case, chunk value should store subject ID, target value should store the time conditions.
<u></u><u></u></p>
<p class="MsoNormal">I am using the classifier code that I found in the maillist:
<a href="http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2009q1/000412.html" target="_blank">
http://lists.alioth.debian.<wbr>org/pipermail/pkg-exppsy-<wbr>pymvpa/2009q1/000412.html</a><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">clf = FeatureSelectionClassifier(\<u></u><u></u></p>
<p class="MsoNormal">                ENET(lm=1.0,max_steps=500,<wbr>trace=False,normalize=False),\<u></u><u></u></p>
<p class="MsoNormal">                SensitivityBasedFeatureSelecti<wbr>on(\<u></u><u></u></p>
<p class="MsoNormal">                              <wbr>  CorrStability(),\<u></u><u></u></p>
<p class="MsoNormal">                              <wbr>  FixedNElementTailSelector(<wbr>5000,mode='select',tail='<wbr>upper')),\<u></u><u></u></p>
<p class="MsoNormal">                descr="ENET on 5K best(CorrStability) features")<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am also using 1000 times of permutation to test the null hypothesis, which are almost the same as those in the tutorial:
<a href="http://www.pymvpa.org/tutorial_significance.html#the-following-content-is-incomplete-and-experimental" target="_blank">
http://www.pymvpa.org/<wbr>tutorial_significance.html#<wbr>the-following-content-is-<wbr>incomplete-and-experimental</a> (section: Avoiding the trap OR Advanced magic 101)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">However, errors suspend my program:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:.5in">/lustre/work/apps/anaconda/<wbr>lib/python2.7/site-packages/<wbr>mvpa2/measures/corrstability.<wbr>py:94: RuntimeWarning: invalid value encountered in divide<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">  covar = (dat1*dat2).mean(0) / (dat1.std(0) * dat2.std(0))<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">/lustre/work/apps/anaconda/<wbr>lib/python2.7/site-packages/<wbr>rpy2/rinterface/__init__.py:<wbr>185: RRuntimeWarning: Error in y - mu : non-numeric argument to binary operator<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:.5in">  warnings.warn(x, RRuntimeWarning)<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">Traceback (most recent call last):<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">  File "15subj_enet.py", line 68, in <module><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">    err_fds = cv_mc_corr_fds(fds)<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">  File "/lustre/work/apps/anaconda/<wbr>lib/python2.7/site-packages/<wbr>mvpa2/base/learner.py", line 258, in __call__<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">    return super(Learner, self).__call__(ds)<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">  File "/lustre/work/apps/anaconda/<wbr>lib/python2.7/site-packages/<wbr>mvpa2/base/node.py", line 136, in __call__<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">    self._precall(ds)<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">  File "/lustre/work/apps/anaconda/<wbr>lib/python2.7/site-packages/<wbr>mvpa2/measures/base.py", line 120, in _precall<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">    self.__null_dist.fit(measure, ds)<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">  File "/lustre/work/apps/anaconda/<wbr>lib/python2.7/site-packages/<wbr>mvpa2/clfs/stats.py", line 427, in fit<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">    % (measure, skipped))<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in">RuntimeError: Failed to obtain any value from <CrossValidation>. 1000 measurements were skipped. Check above warnings, and your code/data<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I was wondering if someone could kindly explain what are those mean, and how do I resolve this?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you very much!<u></u><u></u></p>
<p class="MsoNormal">Carl<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

<br>______________________________<wbr>_________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.<wbr>alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa" rel="noreferrer" target="_blank">http://lists.alioth.debian.<wbr>org/cgi-bin/mailman/listinfo/<wbr>pkg-exppsy-pymvpa</a><br></blockquote></div><br></div>