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

    https://github.com/apache/spark/pull/15277#discussion_r81100804
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/feature/ChiSqSelector.scala ---
    @@ -57,22 +69,21 @@ class ChiSqSelectorModel @Since("1.3.0") (
        * Preserves the order of filtered features the same as their indices 
are stored.
        * Might be moved to Vector as .slice
        * @param features vector
    -   * @param filterIndices indices of features to filter
    +   * @param filterIndices indices of features to filter, must be ordered 
asc
        */
       private def compress(features: Vector, filterIndices: Array[Int]): 
Vector = {
    -    val orderedIndices = filterIndices.sorted
    --- End diff --
    
    Oh, right, `isSorted`. I'm really on the fence about it. It should never 
have been exposed anyway, and I don't see why someone would subclass the class 
to begin with, let alone use this method. I'm OK removing it. I wouldn't argue 
against, however, keeping and deprecating it. But that's separate from the 
issue of making the behavior of this method more correct/fast.


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

Reply via email to