ENH Checks n_features_in_ in covariance#19341
Conversation
glemaitre
left a comment
There was a problem hiding this comment.
Do we want to validate data also for score method of the EmpiricalCovariance class?
| compatibility with other outlier detection algorithms. | ||
| """ | ||
| check_is_fitted(self) | ||
| X = self._validate_data(X, reset=False) |
There was a problem hiding this comment.
Shall make the validation in score_samples instead since it is call below?
Right now, we don't have any check in this method.
There was a problem hiding this comment.
Yes. In this specific case and since predict, decision_function, score all call score_samples, let's move the validation to score_samples.
The common test does not currently cover score. We most likely need to go through all the modules to add |
|
Edit: I looked at the wrong |
Shouldn't there be a |
I think Looking at the code base, adding |
|
Updated PR with adding |
|
Thank you @thomasjpfan |
Reference Issues/PRs
Related to #19333