Github user BryanCutler commented on the issue:

    https://github.com/apache/spark/pull/15113
  
    Hi @yanboliang , thanks for taking a look!
    I'm more inclined to think that most Python users would think that 
`weightCol=None` does not cause a problem, as in this corresponding JIRA.  Most 
are unaware that Py4J will convert the value to `null` behind the scenes.  Let 
me show the LogisticRegression constructor as an example
    ```
        @keyword_only
        def __init__(self, featuresCol="features", labelCol="label", 
predictionCol="prediction",
                     maxIter=100, regParam=0.0, elasticNetParam=0.0, tol=1e-6, 
fitIntercept=True,
                     threshold=0.5, thresholds=None, 
probabilityCol="probability",
                     rawPredictionCol="rawPrediction", standardization=True, 
weightCol=None,
                     aggregationDepth=2):
    ```
    Here it shows `maxIter=100` which means that the param `maxIter` has a 
default value of 100.  Then it shows `weightCol=None`, but this does not mean 
that `weightCol` has a default value of `null`, it means that the param 
`weightCol` is not set by default.  So why would it have a different effect if 
the user explicitly writes it?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to