[ https://issues.apache.org/jira/browse/SPARK-10592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15299190#comment-15299190 ]
Bharath Venkatesh commented on SPARK-10592: ------------------------------------------- Hi Kai I am trying to build a learning model in Spark 1.6 and I think I am hitting a bug related to this deprecation. This is our sample usecase. Creating a learning model: tokenizer = Tokenizer(inputCol=, outputCol=) hashingTF = HashingTF(inputCol=tokenizer.getOutputCol(), outputCol=) lr = LogisticRegression(maxIter=10, regParam=0.01) pipeline = Pipeline(stages=[tokenizer, hashingTF, lr]) model = pipeline.fit(labeledData) Creating a DF: testData=sc.textFile('').map() testDf = sqlContext.createDataFrame(testData, schema).where() Evaluate a target Dataset by calling Model.Transform: predictionsDf = model.transform(testDf) I am calling the transform function. The transform is in turn referring to weights which seems to be deprecated. I am getting the below Warning. Warning: /usr/lib/spark/python/pyspark/ml/classification.py:207: UserWarning: weights is deprecated. Use coefficients instead. warnings.warn("weights is deprecated. Use coefficients instead.") > deprecate weights and use coefficients instead in ML models > ----------------------------------------------------------- > > Key: SPARK-10592 > URL: https://issues.apache.org/jira/browse/SPARK-10592 > Project: Spark > Issue Type: Improvement > Components: ML, PySpark > Reporter: Xiangrui Meng > Assignee: Kai Jiang > Priority: Critical > Fix For: 1.6.0 > > > The name `weights` becomes confusing as we are supporting weighted instanced. > As discussed in https://github.com/apache/spark/pull/7884, we want to > deprecate `weights` and use `coefficients` instead: > * Deprecate but do not remove `weights`. > * Only make changes under `spark.ml`. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org