Re: LinearRegressionWithSGD Outputs NaN

2015-07-21 Thread Burak Yavuz
Hi,
Could you please decrease your step size to 0.1, and also try 0.01? You
could also try running L-BFGS, which doesn't have step size tuning, to get
better results.

Best,
Burak

On Tue, Jul 21, 2015 at 2:59 AM, Naveen nav...@formcept.com wrote:

 Hi ,

 I am trying to use LinearRegressionWithSGD on Million Song Data Set and my
 model returns NaN's as weights and 0.0 as the intercept. What might be the
 issue for the error ? I am using Spark 1.40 in standalone mode.

 Below is my model:

 val numIterations = 100
  val stepSize = 1.0
  val regParam = 0.01
  val regType = L2
  val algorithm = new LinearRegressionWithSGD()

 algorithm.optimizer.setNumIterations(numIterations).setStepSize(stepSize).setRegParam(regParam)
  val model = algorithm.run(parsedTrainData)

 Regards,
 Naveen

 -
 To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
 For additional commands, e-mail: user-h...@spark.apache.org




LinearRegressionWithSGD Outputs NaN

2015-07-21 Thread Naveen

Hi ,

I am trying to use LinearRegressionWithSGD on Million Song Data Set and 
my model returns NaN's as weights and 0.0 as the intercept. What might 
be the issue for the error ? I am using Spark 1.40 in standalone mode.


Below is my model:

val numIterations = 100
 val stepSize = 1.0
 val regParam = 0.01
 val regType = L2
 val algorithm = new LinearRegressionWithSGD()
algorithm.optimizer.setNumIterations(numIterations).setStepSize(stepSize).setRegParam(regParam)
 val model = algorithm.run(parsedTrainData)

Regards,
Naveen

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org