spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-5273) Improve documentation examples for LinearRegression
Date Sat, 09 Jan 2016 13:17:40 GMT

     [ https://issues.apache.org/jira/browse/SPARK-5273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Apache Spark reassigned SPARK-5273:
-----------------------------------

    Assignee: Apache Spark

> Improve documentation examples for LinearRegression 
> ----------------------------------------------------
>
>                 Key: SPARK-5273
>                 URL: https://issues.apache.org/jira/browse/SPARK-5273
>             Project: Spark
>          Issue Type: Improvement
>          Components: Documentation
>            Reporter: Dev Lakhani
>            Assignee: Apache Spark
>            Priority: Minor
>
> In the document:
> https://spark.apache.org/docs/1.1.1/mllib-linear-methods.html
> Under
> Linear least squares, Lasso, and ridge regression
> The suggested method to use LinearRegressionWithSGD.train()
> // Building the model
> val numIterations = 100
> val model = LinearRegressionWithSGD.train(parsedData, numIterations)
> is not ideal even for simple examples such as y=x. This should be replaced with more
real world parameters with step size:
> val lr = new LinearRegressionWithSGD()
> lr.optimizer.setStepSize(0.00000001)
> lr.optimizer.setNumIterations(100)
> or
> LinearRegressionWithSGD.train(input,100,0.00000001)
> To create a reasonable MSE. It took me a while using the dev forum to learn that the
step size should be really small. Might help save someone the same effort when learning mllib.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message