[SciPy-user] maxentropy

Matthew Cooper m.cooper at computer.org
Fri Mar 17 18:31:24 CST 2006


Hi Ed,

Thanks again for working on this.  I can try and work on it a bit this
weekend.  I've had time to look over the two example scripts you provided.
There seemed to be  some difference in the two in terms of the call to the
conditionalmodel fit method.  In the low level example, the count parameter
seemed to provide the empirical counts of the feature functions, where the
features were simply (context,label) co-occurrence.  In the high level
example, the features are more complicated, and the counts parameter seems
to have different dimensionality.  I'll try and get a working high level
example together next.

/mc

On 3/17/06, Ed Schofield <schofield at ftw.at> wrote:
>
> Hi again, Matt ... I hope you don't mind my forwarding this to the list
> too:
> > I appreciate your help with this.  I'm not sure a ton of stuff will
> > have to be changed.  Perhaps the model may need a field for observable
> > data, so the features can map (x,y) to a scalar.  I think the
> > probdist/pmf method in your current model class will need to change,
> > maybe to a method for evaluating P(y|X) for a specific document X.
> >
> > I'm really happy to see this module in Scipy, so if there's anything I
> > can do to help, please let me know.
>
> Now I've been praised in public! I feel warm and fuzzy.
>
> My current thinking is to create a new class, e.g. 'conditionalmodel',
> that derives from the model class and overrides the necessary methods.
> I've written most of the code I think is necessary for this, with a
> couple of example scripts with comments to try to explain what's going
> on.  It's not yet working fully, but I've now made it available anyway
> in my development branch.  You can get it using
>
>     svn checkout http://svn.scipy.org/svn/scipy/branches/ejs scipy_ejs
>
> The two example scripts are in the maxentropy/examples/ directory.
>
> Matt, would you like to take it from here?  My implementation is based
> on a paper by Robert Malouf, "A comparison of algorithms for maximum
> entropy parameter estimation", 2002.  He also made the source code
> available for his implementation, which is now at
> http://tadm.sourceforge.net/.  I've used this for inspiration, and it
> probably deserves more careful study.
>
>
> -- Ed
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.scipy.net/pipermail/scipy-user/attachments/20060317/e88b37ce/attachment.htm


More information about the SciPy-user mailing list