RE: Do I need to applied feature scaling via StandardScaler for LBFGS for Linear Regression?

2014-12-18 Thread Bui, Tri
Bui, Tri Cc: user@spark.apache.org Subject: Re: Do I need to applied feature scaling via StandardScaler for LBFGS for Linear Regression? You can do something like the following. val rddVector = input.map({ case (response, vec) => { val newVec = MLUtils.appendBias(vec) newVec.to

Re: Do I need to applied feature scaling via StandardScaler for LBFGS for Linear Regression?

2014-12-12 Thread DB Tsai
14 1:26 PM > To: Bui, Tri > Cc: user@spark.apache.org > Subject: Re: Do I need to applied feature scaling via StandardScaler for > LBFGS for Linear Regression? > > It seems that your response is not scaled which will cause issue in LBFGS. > Typically, people train Linear Regres

RE: Do I need to applied feature scaling via StandardScaler for LBFGS for Linear Regression?

2014-12-12 Thread Bui, Tri
--- > From: dbt...@dbtsai.com [mailto:dbt...@dbtsai.com] > Sent: Friday, December 12, 2014 12:16 PM > To: Bui, Tri > Cc: user@spark.apache.org > Subject: Re: Do I need to applied feature scaling via StandardScaler for > LBFGS for Linear Regression? > > You need to do the Standa

Re: Do I need to applied feature scaling via StandardScaler for LBFGS for Linear Regression?

2014-12-12 Thread DB Tsai
or org.apache.spark.mllib.linalg.Vector should have an "s" to > match import library org.apache.spark.mllib.linalg.Vectors > > Thanks > Tri > > > > > > -Original Message- > From: dbt...@dbtsai.com [mailto:dbt...@dbtsai.com] > Sent: Friday,

RE: Do I need to applied feature scaling via StandardScaler for LBFGS for Linear Regression?

2014-12-12 Thread Bui, Tri
linalg.Vectors Thanks Tri -Original Message- From: dbt...@dbtsai.com [mailto:dbt...@dbtsai.com] Sent: Friday, December 12, 2014 12:16 PM To: Bui, Tri Cc: user@spark.apache.org Subject: Re: Do I need to applied feature scaling via StandardScaler for LBFGS for Linear Regression? You need to do the

Re: Do I need to applied feature scaling via StandardScaler for LBFGS for Linear Regression?

2014-12-12 Thread DB Tsai
You need to do the StandardScaler to help the convergency yourself. LBFGS just takes whatever objective function you provide without doing any scaling. I will like to provide LinearRegressionWithLBFGS which does the scaling internally in the nearly feature. Sincerely, DB Tsai

Do I need to applied feature scaling via StandardScaler for LBFGS for Linear Regression?

2014-12-12 Thread Bui, Tri
Hi, Trying to use LBFGS as the optimizer, do I need to implement feature scaling via StandardScaler or does LBFGS do it by default? Following code generated error " Failure again! Giving up and returning, Maybe the objective is just poorly behaved ?". val data = sc.textFile("file:///data/Tra