[ 
https://issues.apache.org/jira/browse/SPARK-34642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17296226#comment-17296226
 ] 

Apache Spark commented on SPARK-34642:
--------------------------------------

User 'srowen' has created a pull request for this issue:
https://github.com/apache/spark/pull/31760

> TypeError in Pyspark Linear Regression docs
> -------------------------------------------
>
>                 Key: SPARK-34642
>                 URL: https://issues.apache.org/jira/browse/SPARK-34642
>             Project: Spark
>          Issue Type: Bug
>          Components: Documentation, ML, PySpark
>    Affects Versions: 3.1.1
>            Reporter: Sean R. Owen
>            Priority: Minor
>
> The documentation for Linear Regression in Pyspark includes an example, which 
> contains a TypeError:
> https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.ml.regression.LinearRegression.html?highlight=linearregression#pyspark.ml.regression.LinearRegression
> {code}
> >>> abs(model.transform(test1).head().newPrediction - 1.0) < 0.001
> True
> >>> lr.setParams("vector")
> Traceback (most recent call last):
>     ...
> TypeError: Method setParams forces keyword arguments.
> {code}
> I'm pretty sure we don't intend this, and it can be resolved by just changing 
> the function call to use keyword args.
> (HT Brooke Wenig for flagging this)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to