You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by jamal sasha <ja...@gmail.com> on 2012/11/13 15:08:34 UTC

introduction to logistic regression/mahout

hi,
  I have a dataset of form
x,y,c1, target_variable

so x is continous..
y is continous.
c1 is categorical and can take 3 variables..
target_variable is 0 or 1..
I want to train logistic regression?
Q1: what is the difference between feature flag and predictor flag??
Shouldnt those two be same?

Q2: I have mix of categorical and continous features.. how do i specify
them?

optional question
Q3: what if i have 3 classes?

Thanks

Re: introduction to logistic regression/mahout

Posted by Josh Patterson <jo...@cloudera.com>.
On Tue, Nov 13, 2012 at 9:08 AM, jamal sasha <ja...@gmail.com> wrote:
> hi,
>   I have a dataset of form
> x,y,c1, target_variable
>
> so x is continous..
> y is continous.
> c1 is categorical and can take 3 variables..
> target_variable is 0 or 1..
> I want to train logistic regression?
> Q1: what is the difference between feature flag and predictor flag??
> Shouldnt those two be same?
>

I believe so.

> Q2: I have mix of categorical and continous features.. how do i specify
> them?
>

from the command line. Check out Chapter 14 in Mahout in

> optional question
> Q3: what if i have 3 classes?
>

Mahout's SGD / LogisticRegression is "multinomial logistic
regression", so it can have more than 2 classes.

I wrote out Ted's example from Mahout in Action here (in the book its
in sections):

https://github.com/jpatanooga/MahoutExamples/blob/master/src/main/java/com/cloudera/mahout/classification/sgd/TwentyNewsgroups.java



> Thanks



-- 
Twitter: @jpatanooga
Principal Solution Architect @ Cloudera
hadoop: http://www.cloudera.com