[ https://issues.apache.org/jira/browse/SPARK-34642?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun resolved SPARK-34642. ----------------------------------- Fix Version/s: 3.1.2 3.2.0 Resolution: Fixed Issue resolved by pull request 31760 [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 > Assignee: Sean R. Owen > Priority: Minor > Fix For: 3.2.0, 3.1.2 > > > 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