You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/03/05 17:33:00 UTC

[jira] [Commented] (SPARK-34642) TypeError in Pyspark Linear Regression docs

    [ 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org