Talip7/scikit-learn-issues-multilabel huggingface dataset:
Make automatic validation for all scikit-learn public functions

PR #22722 introduced a decorator to validate the parameters of functions. We now need to use it for all functions where it is applicable.

Please open one PR per function. The title of the PR must mention which function it's dealing with. We recommend using the following pattern for titles:

```
MAINT Parameters validation for <function>
```

where `<function>` is a placeholder to be replaced with the function you chose.

The description of the PR must begin with `Towards #24862` so that this issue and the PR are mutually crossed-linked.

### Steps

1. Chose a public function that is documented in https://scikit-learn.org/dev/modules/classes.html. Check in the source code if the function contains some manual parameter validation (i.e. you should see some `if` condition and error raising). In case there is no validation in the function, you can report it in the issue where we will decide whether or not to skip the function.

2. To validate the function, you need to decorate it with the decorator `sklearn.utils._param_validation.validate_params`. **Do not rely only on the docstring of the estimator to define it**: although it can help, it's important to primarily rely on the implementation to find the valid values because the docstring might not be completely accurate. The decorator take a Python dictionary as input where each key corresponds to a parameter name and the value corresponds to the associate constraints. You can find an example for `kmeans_plusplus` below https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/cluster/_kmeans.py#L63-L74 You can also get more details regarding the constraints by looking at the different Estimators validation previously implemented (cf. the `_parameter_constraints` attribute). 
3. All existing simple param validation can now be removed. (simple means that does not depend on the input data or that does not depend on the value of another parameter for instance).
4. Tests that check error messages from simple param validation can also be removed (carefully: we need to keep the tests checking for more complex param validation !).

5. Finally, add the function to the list of the common param validation test https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/tests/test_public_functions.py#L11-L13
      and make sure the test passes: `pytest -vl sklearn/tests/test_public_functions.py`

### Functions already updated:

See "details" in section 1 

Be aware that you can see an up-to-date list at the following link: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tests/test_public_functions.py#L132

COMMENT:
> @emirkmo no we don't need to validate separately, if the underlying class already does it.

Then `cluster.mean_shift` is also validated.

Labels: Sprint, good first issue, Meta-issue, Validation
Make automatic validation for all scikit-learn public functions

PR #22722 introduced a decorator to validate the parameters of functions. We now need to use it for all functions where it is applicable.

Please open one PR per function. The title of the PR must mention which function it's dealing with. We recommend using the following pattern for titles:

```
MAINT Parameters validation for <function>
```

where `<function>` is a placeholder to be replaced with the function you chose.

The description of the PR must begin with `Towards #24862` so that this issue and the PR are mutually crossed-linked.

### Steps

1. Chose a public function that is documented in https://scikit-learn.org/dev/modules/classes.html. Check in the source code if the function contains some manual parameter validation (i.e. you should see some `if` condition and error raising). In case there is no validation in the function, you can report it in the issue where we will decide whether or not to skip the function.

2. To validate the function, you need to decorate it with the decorator `sklearn.utils._param_validation.validate_params`. **Do not rely only on the docstring of the estimator to define it**: although it can help, it's important to primarily rely on the implementation to find the valid values because the docstring might not be completely accurate. The decorator take a Python dictionary as input where each key corresponds to a parameter name and the value corresponds to the associate constraints. You can find an example for `kmeans_plusplus` below https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/cluster/_kmeans.py#L63-L74 You can also get more details regarding the constraints by looking at the different Estimators validation previously implemented (cf. the `_parameter_constraints` attribute). 
3. All existing simple param validation can now be removed. (simple means that does not depend on the input data or that does not depend on the value of another parameter for instance).
4. Tests that check error messages from simple param validation can also be removed (carefully: we need to keep the tests checking for more complex param validation !).

5. Finally, add the function to the list of the common param validation test https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/tests/test_public_functions.py#L11-L13
      and make sure the test passes: `pytest -vl sklearn/tests/test_public_functions.py`

### Functions already updated:

See "details" in section 1 

Be aware that you can see an up-to-date list at the following link: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tests/test_public_functions.py#L132

COMMENT:
Working on `feature_extraction.image.grid_to_graph` and `feature_extraction.image.img_to_graph`

Labels: Sprint, good first issue, Meta-issue, Validation
Make automatic validation for all scikit-learn public functions

PR #22722 introduced a decorator to validate the parameters of functions. We now need to use it for all functions where it is applicable.

Please open one PR per function. The title of the PR must mention which function it's dealing with. We recommend using the following pattern for titles:

```
MAINT Parameters validation for <function>
```

where `<function>` is a placeholder to be replaced with the function you chose.

The description of the PR must begin with `Towards #24862` so that this issue and the PR are mutually crossed-linked.

### Steps

1. Chose a public function that is documented in https://scikit-learn.org/dev/modules/classes.html. Check in the source code if the function contains some manual parameter validation (i.e. you should see some `if` condition and error raising). In case there is no validation in the function, you can report it in the issue where we will decide whether or not to skip the function.

2. To validate the function, you need to decorate it with the decorator `sklearn.utils._param_validation.validate_params`. **Do not rely only on the docstring of the estimator to define it**: although it can help, it's important to primarily rely on the implementation to find the valid values because the docstring might not be completely accurate. The decorator take a Python dictionary as input where each key corresponds to a parameter name and the value corresponds to the associate constraints. You can find an example for `kmeans_plusplus` below https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/cluster/_kmeans.py#L63-L74 You can also get more details regarding the constraints by looking at the different Estimators validation previously implemented (cf. the `_parameter_constraints` attribute). 
3. All existing simple param validation can now be removed. (simple means that does not depend on the input data or that does not depend on the value of another parameter for instance).
4. Tests that check error messages from simple param validation can also be removed (carefully: we need to keep the tests checking for more complex param validation !).

5. Finally, add the function to the list of the common param validation test https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/tests/test_public_functions.py#L11-L13
      and make sure the test passes: `pytest -vl sklearn/tests/test_public_functions.py`

### Functions already updated:

See "details" in section 1 

Be aware that you can see an up-to-date list at the following link: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tests/test_public_functions.py#L132

COMMENT:
I'm going to try to work on `covariance.shrunk_covariance`

Labels: Sprint, good first issue, Meta-issue, Validation
Make automatic validation for all scikit-learn public functions

PR #22722 introduced a decorator to validate the parameters of functions. We now need to use it for all functions where it is applicable.

Please open one PR per function. The title of the PR must mention which function it's dealing with. We recommend using the following pattern for titles:

```
MAINT Parameters validation for <function>
```

where `<function>` is a placeholder to be replaced with the function you chose.

The description of the PR must begin with `Towards #24862` so that this issue and the PR are mutually crossed-linked.

### Steps

1. Chose a public function that is documented in https://scikit-learn.org/dev/modules/classes.html. Check in the source code if the function contains some manual parameter validation (i.e. you should see some `if` condition and error raising). In case there is no validation in the function, you can report it in the issue where we will decide whether or not to skip the function.

2. To validate the function, you need to decorate it with the decorator `sklearn.utils._param_validation.validate_params`. **Do not rely only on the docstring of the estimator to define it**: although it can help, it's important to primarily rely on the implementation to find the valid values because the docstring might not be completely accurate. The decorator take a Python dictionary as input where each key corresponds to a parameter name and the value corresponds to the associate constraints. You can find an example for `kmeans_plusplus` below https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/cluster/_kmeans.py#L63-L74 You can also get more details regarding the constraints by looking at the different Estimators validation previously implemented (cf. the `_parameter_constraints` attribute). 
3. All existing simple param validation can now be removed. (simple means that does not depend on the input data or that does not depend on the value of another parameter for instance).
4. Tests that check error messages from simple param validation can also be removed (carefully: we need to keep the tests checking for more complex param validation !).

5. Finally, add the function to the list of the common param validation test https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/tests/test_public_functions.py#L11-L13
      and make sure the test passes: `pytest -vl sklearn/tests/test_public_functions.py`

### Functions already updated:

See "details" in section 1 

Be aware that you can see an up-to-date list at the following link: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tests/test_public_functions.py#L132

COMMENT:
@glemaitre What do you think about #24885 . I ran into the issue of having to validate inputs which are type arguments (classes or built-in types, instead of instances of said type).

Labels: Sprint, good first issue, Meta-issue, Validation
Make automatic validation for all scikit-learn public functions

PR #22722 introduced a decorator to validate the parameters of functions. We now need to use it for all functions where it is applicable.

Please open one PR per function. The title of the PR must mention which function it's dealing with. We recommend using the following pattern for titles:

```
MAINT Parameters validation for <function>
```

where `<function>` is a placeholder to be replaced with the function you chose.

The description of the PR must begin with `Towards #24862` so that this issue and the PR are mutually crossed-linked.

### Steps

1. Chose a public function that is documented in https://scikit-learn.org/dev/modules/classes.html. Check in the source code if the function contains some manual parameter validation (i.e. you should see some `if` condition and error raising). In case there is no validation in the function, you can report it in the issue where we will decide whether or not to skip the function.

2. To validate the function, you need to decorate it with the decorator `sklearn.utils._param_validation.validate_params`. **Do not rely only on the docstring of the estimator to define it**: although it can help, it's important to primarily rely on the implementation to find the valid values because the docstring might not be completely accurate. The decorator take a Python dictionary as input where each key corresponds to a parameter name and the value corresponds to the associate constraints. You can find an example for `kmeans_plusplus` below https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/cluster/_kmeans.py#L63-L74 You can also get more details regarding the constraints by looking at the different Estimators validation previously implemented (cf. the `_parameter_constraints` attribute). 
3. All existing simple param validation can now be removed. (simple means that does not depend on the input data or that does not depend on the value of another parameter for instance).
4. Tests that check error messages from simple param validation can also be removed (carefully: we need to keep the tests checking for more complex param validation !).

5. Finally, add the function to the list of the common param validation test https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/tests/test_public_functions.py#L11-L13
      and make sure the test passes: `pytest -vl sklearn/tests/test_public_functions.py`

### Functions already updated:

See "details" in section 1 

Be aware that you can see an up-to-date list at the following link: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tests/test_public_functions.py#L132

COMMENT:
Working on `covariance.oas`

Labels: Sprint, good first issue, Meta-issue, Validation
Make automatic validation for all scikit-learn public functions

PR #22722 introduced a decorator to validate the parameters of functions. We now need to use it for all functions where it is applicable.

Please open one PR per function. The title of the PR must mention which function it's dealing with. We recommend using the following pattern for titles:

```
MAINT Parameters validation for <function>
```

where `<function>` is a placeholder to be replaced with the function you chose.

The description of the PR must begin with `Towards #24862` so that this issue and the PR are mutually crossed-linked.

### Steps

1. Chose a public function that is documented in https://scikit-learn.org/dev/modules/classes.html. Check in the source code if the function contains some manual parameter validation (i.e. you should see some `if` condition and error raising). In case there is no validation in the function, you can report it in the issue where we will decide whether or not to skip the function.

2. To validate the function, you need to decorate it with the decorator `sklearn.utils._param_validation.validate_params`. **Do not rely only on the docstring of the estimator to define it**: although it can help, it's important to primarily rely on the implementation to find the valid values because the docstring might not be completely accurate. The decorator take a Python dictionary as input where each key corresponds to a parameter name and the value corresponds to the associate constraints. You can find an example for `kmeans_plusplus` below https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/cluster/_kmeans.py#L63-L74 You can also get more details regarding the constraints by looking at the different Estimators validation previously implemented (cf. the `_parameter_constraints` attribute). 
3. All existing simple param validation can now be removed. (simple means that does not depend on the input data or that does not depend on the value of another parameter for instance).
4. Tests that check error messages from simple param validation can also be removed (carefully: we need to keep the tests checking for more complex param validation !).

5. Finally, add the function to the list of the common param validation test https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/tests/test_public_functions.py#L11-L13
      and make sure the test passes: `pytest -vl sklearn/tests/test_public_functions.py`

### Functions already updated:

See "details" in section 1 

Be aware that you can see an up-to-date list at the following link: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tests/test_public_functions.py#L132

COMMENT:
I would like to work on `decomposition.dict_learning_online`. Should it be done similar to `decomposition.dict_learning` in #24871?

Labels: Sprint, good first issue, Meta-issue, Validation
Make automatic validation for all scikit-learn public functions

PR #22722 introduced a decorator to validate the parameters of functions. We now need to use it for all functions where it is applicable.

Please open one PR per function. The title of the PR must mention which function it's dealing with. We recommend using the following pattern for titles:

```
MAINT Parameters validation for <function>
```

where `<function>` is a placeholder to be replaced with the function you chose.

The description of the PR must begin with `Towards #24862` so that this issue and the PR are mutually crossed-linked.

### Steps

1. Chose a public function that is documented in https://scikit-learn.org/dev/modules/classes.html. Check in the source code if the function contains some manual parameter validation (i.e. you should see some `if` condition and error raising). In case there is no validation in the function, you can report it in the issue where we will decide whether or not to skip the function.

2. To validate the function, you need to decorate it with the decorator `sklearn.utils._param_validation.validate_params`. **Do not rely only on the docstring of the estimator to define it**: although it can help, it's important to primarily rely on the implementation to find the valid values because the docstring might not be completely accurate. The decorator take a Python dictionary as input where each key corresponds to a parameter name and the value corresponds to the associate constraints. You can find an example for `kmeans_plusplus` below https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/cluster/_kmeans.py#L63-L74 You can also get more details regarding the constraints by looking at the different Estimators validation previously implemented (cf. the `_parameter_constraints` attribute). 
3. All existing simple param validation can now be removed. (simple means that does not depend on the input data or that does not depend on the value of another parameter for instance).
4. Tests that check error messages from simple param validation can also be removed (carefully: we need to keep the tests checking for more complex param validation !).

5. Finally, add the function to the list of the common param validation test https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/tests/test_public_functions.py#L11-L13
      and make sure the test passes: `pytest -vl sklearn/tests/test_public_functions.py`

### Functions already updated:

See "details" in section 1 

Be aware that you can see an up-to-date list at the following link: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tests/test_public_functions.py#L132

COMMENT:
I reduced the scope and start working only on `sklearn.metrics.mean_absolute_error`.

Labels: Sprint, good first issue, Meta-issue, Validation
Make automatic validation for all scikit-learn public functions

PR #22722 introduced a decorator to validate the parameters of functions. We now need to use it for all functions where it is applicable.

Please open one PR per function. The title of the PR must mention which function it's dealing with. We recommend using the following pattern for titles:

```
MAINT Parameters validation for <function>
```

where `<function>` is a placeholder to be replaced with the function you chose.

The description of the PR must begin with `Towards #24862` so that this issue and the PR are mutually crossed-linked.

### Steps

1. Chose a public function that is documented in https://scikit-learn.org/dev/modules/classes.html. Check in the source code if the function contains some manual parameter validation (i.e. you should see some `if` condition and error raising). In case there is no validation in the function, you can report it in the issue where we will decide whether or not to skip the function.

2. To validate the function, you need to decorate it with the decorator `sklearn.utils._param_validation.validate_params`. **Do not rely only on the docstring of the estimator to define it**: although it can help, it's important to primarily rely on the implementation to find the valid values because the docstring might not be completely accurate. The decorator take a Python dictionary as input where each key corresponds to a parameter name and the value corresponds to the associate constraints. You can find an example for `kmeans_plusplus` below https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/cluster/_kmeans.py#L63-L74 You can also get more details regarding the constraints by looking at the different Estimators validation previously implemented (cf. the `_parameter_constraints` attribute). 
3. All existing simple param validation can now be removed. (simple means that does not depend on the input data or that does not depend on the value of another parameter for instance).
4. Tests that check error messages from simple param validation can also be removed (carefully: we need to keep the tests checking for more complex param validation !).

5. Finally, add the function to the list of the common param validation test https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/tests/test_public_functions.py#L11-L13
      and make sure the test passes: `pytest -vl sklearn/tests/test_public_functions.py`

### Functions already updated:

See "details" in section 1 

Be aware that you can see an up-to-date list at the following link: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/tests/test_public_functions.py#L132

COMMENT:
Working on metrics.accuracy_score

Labels: Sprint, good first issue, Meta-issue, Validation