MaxEnt weights

54 views
Skip to first unread message

Lee Becker

unread,
Dec 20, 2011, 2:18:05 AM12/20/11
to cleartk-users
Does anybody know how I can figure out the feature weights from the
Mallet maxent model file? I want to get a rough idea of feature
importance, and I don't see anything obvious. I see in the Mallet
javadocs, you can call the print method on the MaxEnt class. Is there
a way to get this through the annotator's classifier class?

Lee Becker

unread,
Dec 20, 2011, 12:51:03 PM12/20/11
to cleartk-users

I figured out how to read the model file back in using the mallet
APIs.
http://mallet.cs.umass.edu/classifier-devel.php

I'd still be interested to know if we have access to the original
classifiers in ClearTK.

Steven Bethard

unread,
Dec 29, 2011, 4:47:35 AM12/29/11
to cleart...@googlegroups.com

You mean access to the cc.mallet.classify.Classifier, not the
org.cleartk.classifier.Classifier, right? MalletClassifier_ImplBase
has a protected "classifier" attribute, which we could add a getter
for and then you could get that via some casting. But I'm not sure if
that would solve your problem since the mallet Classifier API doesn't
seem to give access to feature weights...

What are you trying to do?

Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
        --- The Hiphopopotamus

Lee Becker

unread,
Dec 29, 2011, 12:08:07 PM12/29/11
to cleart...@googlegroups.com


On Thu, Dec 29, 2011 at 2:47 AM, Steven Bethard <steven....@gmail.com> wrote:
You mean access to the cc.mallet.classify.Classifier, not the
org.cleartk.classifier.Classifier, right? MalletClassifier_ImplBase
has a protected "classifier" attribute, which we could add a getter
for and then you could get that via some casting. But I'm not sure if
that would solve your problem since the mallet Classifier API doesn't
seem to give access to feature weights...

What are you trying to do?

I was mainly trying to get a sense of what features were important by their weights.  There is probably no need to change any APIs and the workaround I posted before should work for me.
Reply all
Reply to author
Forward
0 new messages