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

    https://github.com/apache/spark/pull/7029#discussion_r33435597
  
    --- Diff: docs/mllib-feature-extraction.md ---
    @@ -419,10 +419,11 @@ import org.apache.spark.mllib.feature.ChiSqSelector
     // Load some data in libsvm format
     val data = MLUtils.loadLibSVMFile(sc, "data/mllib/sample_libsvm_data.txt")
     // Discretize data in 16 equal bins since ChiSqSelector requires 
categorical features
    +// Even though features are doubles, the ChiSqSelector treats each unique 
value as a category
     val discretizedData = data.map { lp =>
    -  LabeledPoint(lp.label, Vectors.dense(lp.features.toArray.map { x => x / 
16 } ) )
    +  LabeledPoint(lp.label, Vectors.dense(lp.features.toArray.map { x => (x / 
16).floor } ) )
     }
    -// Create ChiSqSelector that will select 50 features
    +// Create ChiSqSelector that will select top 50  of 692 features
    --- End diff --
    
    remove the extra space after 50


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