Github user MLnick commented on a diff in the pull request:
https://github.com/apache/spark/pull/15299#discussion_r81316871
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/feature/ChiSqSelector.scala ---
@@ -35,14 +35,15 @@ import org.apache.spark.sql.{Row, SparkSession}
/**
* Chi Squared selector model.
*
- * @param selectedFeatures list of indices to select (filter). Must be
ordered asc
+ * @param selectedFeatures list of indices to select (filter).
*/
@Since("1.3.0")
class ChiSqSelectorModel @Since("1.3.0") (
@Since("1.3.0") val selectedFeatures: Array[Int]) extends
VectorTransformer with Saveable {
- require(isSorted(selectedFeatures), "Array has to be sorted asc")
+ private val filterIndices = selectedFeatures.sorted
+ @deprecated("not intended for subclasses to use", "2.1.0")
--- End diff --
Yeah, I also fail to see why this needs to be exposed. +1 on deprecation.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]