Skip to content

Commit

Permalink
MAINT Parameters validation for sklearn.covariance.log_likelihood (sc…
Browse files Browse the repository at this point in the history
…ikit-learn#26539)

Co-authored-by: Guillaume Lemaitre <[email protected]>
  • Loading branch information
Stamic-kk and glemaitre committed Jun 29, 2023
1 parent fbdc7b3 commit 315a04c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sklearn/covariance/_empirical_covariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
from ..utils.extmath import fast_logdet


@validate_params(
{
"emp_cov": [np.ndarray],
"precision": [np.ndarray],
},
prefer_skip_nested_validation=True,
)
def log_likelihood(emp_cov, precision):
"""Compute the sample mean of the log_likelihood under a covariance model.
Expand Down
1 change: 1 addition & 0 deletions sklearn/tests/test_public_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def _check_function_param_validation(
"sklearn.cluster.ward_tree",
"sklearn.covariance.empirical_covariance",
"sklearn.covariance.ledoit_wolf_shrinkage",
"sklearn.covariance.log_likelihood",
"sklearn.covariance.shrunk_covariance",
"sklearn.datasets.clear_data_home",
"sklearn.datasets.dump_svmlight_file",
Expand Down

0 comments on commit 315a04c

Please sign in to comment.