Github user sethah commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11663#discussion_r56548734
  
    --- Diff: python/pyspark/ml/param/_shared_params_code_gen.py ---
    @@ -105,64 +104,71 @@ def get$Name(self):
     if __name__ == "__main__":
         print(header)
         print("\n# DO NOT MODIFY THIS FILE! It was generated by 
_shared_params_code_gen.py.\n")
    -    print("from pyspark.ml.param import Param, Params\n\n")
    +    print("from pyspark.ml.param import *\n\n")
         shared = [
    -        ("maxIter", "max number of iterations (>= 0).", None, int),
    -        ("regParam", "regularization parameter (>= 0).", None, float),
    -        ("featuresCol", "features column name.", "'features'", str),
    -        ("labelCol", "label column name.", "'label'", str),
    -        ("predictionCol", "prediction column name.", "'prediction'", str),
    +        ("maxIter", "max number of iterations (>= 0).", None, 
"TypeConverters.convertToInt"),
    +        ("regParam", "regularization parameter (>= 0).", None, 
"TypeConverters.convertToFloat"),
    +        ("featuresCol", "features column name.", "'features'", None),
    +        ("labelCol", "label column name.", "'label'", None),
    +        ("predictionCol", "prediction column name.", "'prediction'", None),
             ("probabilityCol", "Column name for predicted class conditional 
probabilities. " +
              "Note: Not all models output well-calibrated probability 
estimates! These probabilities " +
    -         "should be treated as confidences, not precise probabilities.", 
"'probability'", str),
    +         "should be treated as confidences, not precise probabilities.", 
"'probability'", None),
             ("rawPredictionCol", "raw prediction (a.k.a. confidence) column 
name.", "'rawPrediction'",
    -         str),
    -        ("inputCol", "input column name.", None, str),
    -        ("inputCols", "input column names.", None, None),
    -        ("outputCol", "output column name.", "self.uid + '__output'", str),
    -        ("numFeatures", "number of features.", None, int),
    +         None),
    +        ("inputCol", "input column name.", None, None),
    +        ("inputCols", "input column names.", None, 
"TypeConverters.convertToList"),
    +        ("outputCol", "output column name.", "self.uid + '__output'", 
None),
    +        ("numFeatures", "number of features.", None, 
"TypeConverters.convertToInt"),
             ("checkpointInterval", "set checkpoint interval (>= 1) or disable 
checkpoint (-1). " +
    -         "E.g. 10 means that the cache will get checkpointed every 10 
iterations.", None, int),
    -        ("seed", "random seed.", "hash(type(self).__name__)", int),
    -        ("tol", "the convergence tolerance for iterative algorithms.", 
None, float),
    -        ("stepSize", "Step size to be used for each iteration of 
optimization.", None, float),
    +         "E.g. 10 means that the cache will get checkpointed every 10 
iterations.", None,
    +         "TypeConverters.convertToInt"),
    +        ("seed", "random seed.", "hash(type(self).__name__)", 
"TypeConverters.convertToInt"),
    +        ("tol", "the convergence tolerance for iterative algorithms.", 
None,
    +         "TypeConverters.convertToFloat"),
    +        ("stepSize", "Step size to be used for each iteration of 
optimization.", None,
    +         "TypeConverters.convertToFloat"),
             ("handleInvalid", "how to handle invalid entries. Options are skip 
(which will filter " +
              "out rows with bad values), or error (which will throw an 
errror). More options may be " +
    -         "added later.", None, str),
    +         "added later.", None, None),
             ("elasticNetParam", "the ElasticNet mixing parameter, in range [0, 
1]. For alpha = 0, " +
    -         "the penalty is an L2 penalty. For alpha = 1, it is an L1 
penalty.", "0.0", float),
    -        ("fitIntercept", "whether to fit an intercept term.", "True", 
bool),
    +         "the penalty is an L2 penalty. For alpha = 1, it is an L1 
penalty.", "0.0",
    +         "TypeConverters.convertToFloat"),
    +        ("fitIntercept", "whether to fit an intercept term.", "True", 
None),
    --- End diff --
    
    Added a `toBoolean` converter.


---
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