Re: [pymvpa] ENET error

2016-09-29 Thread Liang, Guangsheng
Thanks!
I now use the remove_invariant_features() on my full dataset first, and then 
run the program again.
But I still got the same error message:

/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/measures/corrstability.py:94:
 RuntimeWarning: invalid value encountered in divide
  covar = (dat1*dat2).mean(0) / (dat1.std(0) * dat2.std(0))
/lustre/work/apps/anaconda/lib/python2.7/site-packages/rpy2/rinterface/__init__.py:185:
 RRuntimeWarning: Error in y - mu : non-numeric argument to binary operator

And warning message:
WARNING: Failed to obtain value from  due to Failed to predict 
on , , 
 using . Exceptions was: Error in y - mu : non-numeric argument to binary 
operator
.  Measurement was skipped, which could lead to unstable and/or incorrect 
assessment of the null_dist

I did not use any mask this time.
Any thoughts on that? Any help will be appreciated!

From: Yaroslav Halchenko [mailto:y...@onerussian.com]
Sent: Tuesday, September 20, 2016 4:43 PM
To: Development and support of PyMVPA 
; Liang, Guangsheng 

Subject: Re: [pymvpa] ENET error

On September 20, 2016 3:46:40 PM EDT, "Liang, Guangsheng" 
mailto:guangsheng.li...@ttu.edu>> wrote:
Hello,


Thank you very much for your kindly response.
Which function that I can remove them?


Thanks again!
Carl


From: Pkg-ExpPsy-PyMVPA 
[mailto:pkg-exppsy-pymvpa-bounces+guangsheng.liang=ttu@lists.alioth.debian.org]
 On Behalf Of Richard Dinga
Sent: Tuesday, September 20, 2016 3:50 AM
To: Development and support of PyMVPA 
mailto:pkg-exppsy-pymvpa@lists.alioth.debian.org>>
Subject: Re: [pymvpa] ENET error


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.


On Fri, Sep 16, 2016 at 8:01 PM, Liang, Guangsheng 
mailto:guangsheng.li...@ttu.edu>> wrote:
Hello PyMVPA community,

I am currently working on a fMRI data applying an ENET classifier.
My PyMVPA is running under Linux environment, with python 2.7.12.
The design of the data is a repeated measurement with pre and post conditions.
In my understanding, in my case, chunk value should store subject ID, target 
value should store the time conditions.
I am using the classifier code that I found in the maillist: 
http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2009q1/000412.html

clf = FeatureSelectionClassifier(\
ENET(lm=1.0,max_steps=500,trace=False,normalize=False),\
SensitivityBasedFeatureSelection(\
CorrStability(),\

FixedNElementTailSelector(5000,mode='select',tail='upper')),\
descr="ENET on 5K best(CorrStability) features")


I am also using 1000 times of permutation to test the null hypothesis, which 
are almost the same as those in the tutorial: 
http://www.pymvpa.org/tutorial_significance.html#the-following-content-is-incomplete-and-experimental
 (section: Avoiding the trap OR Advanced magic 101)

However, errors suspend my program:

/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/measures/corrstability.py:94:
 RuntimeWarning: invalid value encountered in divide
  covar = (dat1*dat2).mean(0) / (dat1.std(0) * dat2.std(0))
/lustre/work/apps/anaconda/lib/python2.7/site-packages/rpy2/rinterface/__init__.py:185:
 RRuntimeWarning: Error in y - mu : non-numeric argument to binary operator

  warnings.warn(x, RRuntimeWarning)
Traceback (most recent call last):
  File "15subj_enet.py", line 68, in 
err_fds = cv_mc_corr_fds(fds)
  File 
"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/base/learner.py", 
line 258, in __call__
return super(Learner, self).__call__(ds)
  File 
"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/base/node.py", 
line 136, in __call__
self._precall(ds)
  File 
"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/measures/base.py",
 line 120, in _precall
self.__null_dist.fit(measure, ds)
  File 
"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/clfs/stats.py", 
line 427, in fit
% (measure, skipped))
RuntimeError: Failed to obtain any value from . 1000 
measurements were skipped. Check above warnings, and your code/data


I was wondering if someone could kindly explain what are those mean, and how do 
I resolve this?

Thank you very much!
Carl


___
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org<mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org>
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa





Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org<mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org>
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

http://www.pymvpa.o

Re: [pymvpa] ENET error

2016-09-20 Thread Yaroslav Halchenko
On September 20, 2016 3:46:40 PM EDT, "Liang, Guangsheng" 
 wrote:
>Hello,
>
>Thank you very much for your kindly response.
>Which function that I can remove them?
>
>Thanks again!
>Carl
>
>From: Pkg-ExpPsy-PyMVPA
>[mailto:pkg-exppsy-pymvpa-bounces+guangsheng.liang=ttu@lists.alioth.debian.org]
>On Behalf Of Richard Dinga
>Sent: Tuesday, September 20, 2016 3:50 AM
>To: Development and support of PyMVPA
>
>Subject: Re: [pymvpa] ENET error
>
>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.
>
>On Fri, Sep 16, 2016 at 8:01 PM, Liang, Guangsheng
>mailto:guangsheng.li...@ttu.edu>> wrote:
>Hello PyMVPA community,
>
>I am currently working on a fMRI data applying an ENET classifier.
>My PyMVPA is running under Linux environment, with python 2.7.12.
>The design of the data is a repeated measurement with pre and post
>conditions.
>In my understanding, in my case, chunk value should store subject ID,
>target value should store the time conditions.
>I am using the classifier code that I found in the maillist:
>http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2009q1/000412.html
>
>clf = FeatureSelectionClassifier(\
>   ENET(lm=1.0,max_steps=500,trace=False,normalize=False),\
>SensitivityBasedFeatureSelection(\
>CorrStability(),\
>  FixedNElementTailSelector(5000,mode='select',tail='upper')),\
>descr="ENET on 5K best(CorrStability) features")
>
>
>I am also using 1000 times of permutation to test the null hypothesis,
>which are almost the same as those in the tutorial:
>http://www.pymvpa.org/tutorial_significance.html#the-following-content-is-incomplete-and-experimental
>(section: Avoiding the trap OR Advanced magic 101)
>
>However, errors suspend my program:
>
>/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/measures/corrstability.py:94:
>RuntimeWarning: invalid value encountered in divide
>  covar = (dat1*dat2).mean(0) / (dat1.std(0) * dat2.std(0))
>/lustre/work/apps/anaconda/lib/python2.7/site-packages/rpy2/rinterface/__init__.py:185:
>RRuntimeWarning: Error in y - mu : non-numeric argument to binary
>operator
>
>  warnings.warn(x, RRuntimeWarning)
>Traceback (most recent call last):
>  File "15subj_enet.py", line 68, in 
>err_fds = cv_mc_corr_fds(fds)
>File
>"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/base/learner.py",
>line 258, in __call__
>return super(Learner, self).__call__(ds)
>File
>"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/base/node.py",
>line 136, in __call__
>self._precall(ds)
>File
>"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/measures/base.py",
>line 120, in _precall
>self.__null_dist.fit(measure, ds)
>File
>"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/clfs/stats.py",
>line 427, in fit
>% (measure, skipped))
>RuntimeError: Failed to obtain any value from . 1000
>measurements were skipped. Check above warnings, and your code/data
>
>
>I was wondering if someone could kindly explain what are those mean,
>and how do I resolve this?
>
>Thank you very much!
>Carl
>
>
>___
>Pkg-ExpPsy-PyMVPA mailing list
>Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org<mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org>
>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>
>
>
>
>
>___
>Pkg-ExpPsy-PyMVPA mailing list
>Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org
>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

http://www.pymvpa.org/faq.html#is-there-an-easy-way-to-remove-invariant-features-from-a-dataset
;-)
-- 
Sent from a phone which beats iPhone.___
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

Re: [pymvpa] ENET error

2016-09-20 Thread Liang, Guangsheng
Hello,

Thank you very much for your kindly response.
Which function that I can remove them?

Thanks again!
Carl

From: Pkg-ExpPsy-PyMVPA 
[mailto:pkg-exppsy-pymvpa-bounces+guangsheng.liang=ttu@lists.alioth.debian.org]
 On Behalf Of Richard Dinga
Sent: Tuesday, September 20, 2016 3:50 AM
To: Development and support of PyMVPA 

Subject: Re: [pymvpa] ENET error

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.

On Fri, Sep 16, 2016 at 8:01 PM, Liang, Guangsheng 
mailto:guangsheng.li...@ttu.edu>> wrote:
Hello PyMVPA community,

I am currently working on a fMRI data applying an ENET classifier.
My PyMVPA is running under Linux environment, with python 2.7.12.
The design of the data is a repeated measurement with pre and post conditions.
In my understanding, in my case, chunk value should store subject ID, target 
value should store the time conditions.
I am using the classifier code that I found in the maillist: 
http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2009q1/000412.html

clf = FeatureSelectionClassifier(\
ENET(lm=1.0,max_steps=500,trace=False,normalize=False),\
SensitivityBasedFeatureSelection(\
CorrStability(),\

FixedNElementTailSelector(5000,mode='select',tail='upper')),\
descr="ENET on 5K best(CorrStability) features")


I am also using 1000 times of permutation to test the null hypothesis, which 
are almost the same as those in the tutorial: 
http://www.pymvpa.org/tutorial_significance.html#the-following-content-is-incomplete-and-experimental
 (section: Avoiding the trap OR Advanced magic 101)

However, errors suspend my program:

/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/measures/corrstability.py:94:
 RuntimeWarning: invalid value encountered in divide
  covar = (dat1*dat2).mean(0) / (dat1.std(0) * dat2.std(0))
/lustre/work/apps/anaconda/lib/python2.7/site-packages/rpy2/rinterface/__init__.py:185:
 RRuntimeWarning: Error in y - mu : non-numeric argument to binary operator

  warnings.warn(x, RRuntimeWarning)
Traceback (most recent call last):
  File "15subj_enet.py", line 68, in 
err_fds = cv_mc_corr_fds(fds)
  File 
"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/base/learner.py", 
line 258, in __call__
return super(Learner, self).__call__(ds)
  File 
"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/base/node.py", 
line 136, in __call__
self._precall(ds)
  File 
"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/measures/base.py",
 line 120, in _precall
self.__null_dist.fit(measure, ds)
  File 
"/lustre/work/apps/anaconda/lib/python2.7/site-packages/mvpa2/clfs/stats.py", 
line 427, in fit
% (measure, skipped))
RuntimeError: Failed to obtain any value from . 1000 
measurements were skipped. Check above warnings, and your code/data


I was wondering if someone could kindly explain what are those mean, and how do 
I resolve this?

Thank you very much!
Carl


___
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org<mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org>
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

___
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

Re: [pymvpa] ENET error

2016-09-20 Thread Richard Dinga
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.

On Fri, Sep 16, 2016 at 8:01 PM, Liang, Guangsheng  wrote:

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