[pymvpa] regression analysis to predict subject-specific score
Yaroslav Halchenko
debian at onerussian.com
Thu Aug 11 16:00:18 UTC 2011
indeed we have no good tutorial/example for regressions yet besides one
for GPR
doc/examples/gpr.py
also we interface to SVR regressions (from libsvm and shogun) and started
to add interfaces to scikits.learn. Some samples of them are available from
regrswh, so on my system:
*In [5]: print '\n'.join([str(x) for x in regrswh[:]])
<libsvm epsilon-SVR>
<libsvm nu-SVR>
<sg.LinSVMR()/libsvr>
<skl.PLSRegression_1d()>
<skl.LARS()>
<skl.LassoLARS()>
<GPR(kernel='linear')>
<GPR(kernel='sqexp')>
As for "howto" -- just the same way you use classifiers -- then ConfusionMatrix
in .stats would be replaced with RegressionStatistics. e.g.
In [5]: from mvpa.suite import *
In [6]: from mvpa.testing.datasets import datasets as testing_datasets
In [7]: cve = CrossValidation(regrswh[:][0], NFoldPartitioner(), postproc=mean_sample(), errorfx=corr_error, enable_ca=['training_stats', 'stats'])
In [8]: print cve(testing_datasets['chirp_linear'])
<Dataset: 1x1 at float64, <sa: cvfolds>>
In [9]: print cve.ca.stats
Statistics Mean Std Min Max
---------- ----- ----- ----- -----
Data:
RMP_t 0.668 0.015 0.639 0.681
STD_t 0.661 0.015 0.631 0.675
RMP_p 0.644 0.043 0.593 0.731
STD_p 0.637 0.042 0.583 0.721
Results:
CCe 0.06 0.016 0.036 0.084
RMSE 0.232 0.027 0.184 0.266
RMSE/RMP_t 0.348 0.043 0.27 0.4
Summary:
CCe 0.06 p= 3.65268e-137
RMSE 0.23
RMSE/RMP_t 0.35
# of sets 6
On Mon, 08 Aug 2011, Zhen Zonglei wrote:
> Hi Guys:
> I am trying to do multivariate regression analysis to predict
> subject-specific score with pymvpa 0.6. But, I did not find some
> examples about this in the manual. What regressions are implemented in
> the toolbox? Could you please show me how to do regression analysis in
> the toolbox?
> Best
> Zonglei Zhen
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
--
=------------------------------------------------------------------=
Keep in touch www.onerussian.com
Yaroslav Halchenko www.ohloh.net/accounts/yarikoptic
More information about the Pkg-ExpPsy-PyMVPA
mailing list