[pymvpa] Can't access an enabled classifier attribute.
Roberto Guidotti
robbenson18 at gmail.com
Tue Nov 27 15:09:34 UTC 2012
Thank you for the response Yaroslav,
Well the snippet probabilities = clf.ca.probabilities is only an example
that I've build to reveal the exception (I didn't think is a version
problem, I had 2.0.1 mvpa)!!
BTW I was quite sure that the problem relied on the cross validation :)!
I would like to gather all the predictions/probabilities for each cv fold.
This why using the ca 'training_stats' during the definition of the
classifier, I had the probabilities of the samples during training?
So I can't have access to every cv fold probabilities/predictions using
CrossValidation object? Or I need a manual CrossValidation (and sometimes a
Feature Selection)?
Thank you!
Roberto
On 27 November 2012 15:49, Yaroslav Halchenko <debian at onerussian.com> wrote:
>
> On Tue, 27 Nov 2012, Roberto Guidotti wrote:
>
> > Dear all,
> > I've a problem with classifier's conditional attributes (it is
> possibly
> > due to a bad command understanding, by myself, I admit!):
> > clf = LinearCSVMC(C=1, probability=1, enable_ca=['probabilities'])
> > cvte = CrossValidation(clf, NFoldPartitioner(cvtype = 1),
> > enable_ca=['stats', 'repetition_results'])
> > train_err = cvte(evds)
> > When I try to see inside the conditional attributes of my trained
> > classifier clf with the command below
> > probabilities = clf.ca.probabilities
>
> odd enough above snippet (with probabilities = clf.ca.probabilities)
> works for me just fine. but -- this way you are obtaining
> probabilities only for the last cross-validation fold. what is the goal
> -- to get them for every CV fold? (then CrossValidation should get a
> callback to harvest them) or on all the data (then you would need to
> "clf.train(evds); clf.predict(evds);" and then gather
> clf.ca.probabilities
>
> > I have this exception
> > UnknownStateError: Unknown yet value of probabilities
> > Instead using a classifier defined as:
> > clf = LinearCSVMC(C=1, probability=1, enable_ca=['probabilities',
> > 'training_stats'])
> > I could store my probabilities.
> > Am I doing all the things well?
> > Thank you
> > Roberto
> --
> Yaroslav O. Halchenko
> Postdoctoral Fellow, Department of Psychological and Brain Sciences
> Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
> Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
> WWW: http://www.linkedin.com/in/yarik
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20121127/2de28963/attachment.html>
More information about the Pkg-ExpPsy-PyMVPA
mailing list