[SciPy-user] maxentropy

Ed Schofield schofield at ftw.at
Fri Mar 17 07:38:13 CST 2006


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



More information about the SciPy-user mailing list