Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private[ml] abstract class Selector[T <: SelectorModel[T]]
.where(col("pValue") < $(fwe) / numFeatures)
.as[Int].collect()
case errorType =>
throw new IllegalStateException(s"Unknown Selector Type: $errorType")
throw new IllegalArgumentException(s"Unknown Selector Type: $errorType")
}

copyValues(createSelectorModel(uid, indices.sorted)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class ChiSqSelector @Since("2.1.0") () extends Serializable {
chiSqTestResult
.filter { case (res, _) => res.pValue < fwe / chiSqTestResult.length }
case errorType =>
throw new IllegalStateException(s"Unknown ChiSqSelector Type: $errorType")
throw new IllegalArgumentException(s"Unknown ChiSqSelector Type: $errorType")
}
val indices = features.map { case (_, index) => index }
new ChiSqSelectorModel(indices)
Expand Down