You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by greglee73 <gr...@zoho.com> on 2012/02/14 01:53:59 UTC
Logistic regression coefficients from Java?
Hi all,
I'm a long-time machine learning enthusiast and have started using Mahout. I'm already a big fan, but am having a challenge when it comes to the Logistic Regression models I've been training.
I'm using Java and building the models through Java rather than a command line interface. Specifically using the OnlineLogisticRegression class as I come to grips with Mahout.
My question: how do I get the model to print the actual coefficients once the model is trained? Can't find any documentation on this.
Thanks,
Greg
Re: Logistic regression coefficients from Java?
Posted by Ted Dunning <te...@gmail.com>.
It is a bit obscure, but the javadoc + unit tests should be pretty clear.
Your help in improving them would be great.
The basic idea is that the encoders all allow your to supply a so-called
trace dictionary. This records what terms go where. You can encode a few
docs, then pass the training dictionary and the model to the update on the
ModelDissector, clear the trace dictionary and repeat. The model dissector
correlates the trace dictionary with the effects of the model to get an
estimate of what matters.
On Mon, Feb 13, 2012 at 10:34 PM, greglee73 <gr...@zoho.com> wrote:
> Hi Ted,
>
> Thanks for the help. I've been trying to understand how the ModelDissector
> class works, but am having some trouble. How do I instantiate a
> ModelDissector object from a model or vice versa? If you have any links or
> code you can share, that would be great.
>
>
> Thanks,
> Greg
>
>
> ---- On Mon, 13 Feb 2012 18:31:12 -0800 Ted
> Dunning<ted.dunning@gmail.com> wrote ----
>
>
> The ModelDissector class may be what you want.
>
> The problem is mostly not in the Logistic Regression part of the code, but
> rather in the hashed representation.
>
> On Tue, Feb 14, 2012 at 12:53 AM, greglee73 <greglee73@zoho.com>
> wrote:
>
> > Hi all,
> >
> > I'm a long-time machine learning enthusiast and have started using
> Mahout.
> > I'm already a big fan, but am having a challenge when it comes to the
> > Logistic Regression models I've been training.
> >
> >
> > I'm using Java and building the models through Java rather than a
> command
> > line interface. Specifically using the OnlineLogisticRegression class
> as I
> > come to grips with Mahout.
> >
> >
> > My question: how do I get the model to print the actual coefficients
> once
> > the model is trained? Can't find any documentation on this.
> >
> >
> > Thanks,
> > Greg
> >
> >
> >
> >
> >
> >
>
>
>
>
Re: Logistic regression coefficients from Java?
Posted by greglee73 <gr...@zoho.com>.
Hi Ted,
Thanks for the help. I've been trying to understand how the ModelDissector class works, but am having some trouble. How do I instantiate a ModelDissector object from a model or vice versa? If you have any links or code you can share, that would be great.
Thanks,
Greg
---- On Mon, 13 Feb 2012 18:31:12 -0800 Ted Dunning<ted.dunning@gmail.com> wrote ----
The ModelDissector class may be what you want.
The problem is mostly not in the Logistic Regression part of the code, but
rather in the hashed representation.
On Tue, Feb 14, 2012 at 12:53 AM, greglee73 <greglee73@zoho.com> wrote:
> Hi all,
>
> I'm a long-time machine learning enthusiast and have started using Mahout.
> I'm already a big fan, but am having a challenge when it comes to the
> Logistic Regression models I've been training.
>
>
> I'm using Java and building the models through Java rather than a command
> line interface. Specifically using the OnlineLogisticRegression class as I
> come to grips with Mahout.
>
>
> My question: how do I get the model to print the actual coefficients once
> the model is trained? Can't find any documentation on this.
>
>
> Thanks,
> Greg
>
>
>
>
>
>
Re: Logistic regression coefficients from Java?
Posted by Ted Dunning <te...@gmail.com>.
The ModelDissector class may be what you want.
The problem is mostly not in the Logistic Regression part of the code, but
rather in the hashed representation.
On Tue, Feb 14, 2012 at 12:53 AM, greglee73 <gr...@zoho.com> wrote:
> Hi all,
>
> I'm a long-time machine learning enthusiast and have started using Mahout.
> I'm already a big fan, but am having a challenge when it comes to the
> Logistic Regression models I've been training.
>
>
> I'm using Java and building the models through Java rather than a command
> line interface. Specifically using the OnlineLogisticRegression class as I
> come to grips with Mahout.
>
>
> My question: how do I get the model to print the actual coefficients once
> the model is trained? Can't find any documentation on this.
>
>
> Thanks,
> Greg
>
>
>
>
>
>