[
https://issues.apache.org/jira/browse/SPARK-34642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun reassigned SPARK-34642:
-------------------------------------
Assignee: Sean R. Owen
> 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
> Assignee: 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: [email protected]
For additional commands, e-mail: [email protected]