The Spark documentation shows the following example code:

// Discretize data in 16 equal bins since ChiSqSelector requires categorical
features
val discretizedData = data.map { lp =>
  LabeledPoint(lp.label, Vectors.dense(lp.features.toArray.map { x => x / 16
} ) )
}

I'm sort of missing why "x / 16" is considered a discretization approach
here. 

[https://spark.apache.org/docs/latest/mllib-feature-extraction.html#feature-selection]



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Discretization-tp22811.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

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

Reply via email to