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

    https://github.com/apache/spark/pull/19588#discussion_r148969162
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/feature/VectorIndexer.scala ---
    @@ -37,7 +38,25 @@ import org.apache.spark.sql.types.{StructField, 
StructType}
     import org.apache.spark.util.collection.OpenHashSet
     
     /** Private trait for params for VectorIndexer and VectorIndexerModel */
    -private[ml] trait VectorIndexerParams extends Params with HasInputCol with 
HasOutputCol {
    +private[ml] trait VectorIndexerParams extends Params with HasInputCol with 
HasOutputCol
    +  with HasHandleInvalid {
    +
    +  /**
    +   * Param for how to handle invalid data (unseen labels or NULL values).
    +   * Options are 'skip' (filter out rows with invalid data),
    +   * 'error' (throw an error), or 'keep' (put invalid data in a special 
additional
    +   * bucket, at index numLabels).
    +   * Default: "error"
    --- End diff --
    
    minor. 
    add case-sensitive.
    
    maybe break it into multiple lines:
      'skip': filter out rows with invalid data.
      'error': throw an error.
      'keep': put invalid data in a special additional bucket, at index 
numLabels.
    
    And numLabels is a little confusing, how about numCategories?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to