Sean R. Owen created SPARK-34642: ------------------------------------ Summary: 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
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