srowen commented on a change in pull request #23818:
[SPARK-19591][ML][PYSPARK][FOLLOWUP] Add sample weights to decision trees
URL: https://github.com/apache/spark/pull/23818#discussion_r258577213
##########
File path: python/pyspark/ml/classification.py
##########
@@ -902,12 +902,12 @@ class DecisionTreeClassifier(JavaEstimator,
HasFeaturesCol, HasLabelCol, HasPred
>>> from pyspark.ml.linalg import Vectors
>>> from pyspark.ml.feature import StringIndexer
>>> df = spark.createDataFrame([
- ... (1.0, Vectors.dense(1.0)),
- ... (0.0, Vectors.sparse(1, [], []))], ["label", "features"])
+ ... (1.0, 1.0, Vectors.dense(1.0)),
Review comment:
My only nit here is that now this shows usage with weights, only, but the
weight is 1. Maybe have two quick examples, one without specifying weight and
one with a weight != 1?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]