huggingface / huggingface/evaluate
MSE metric broken: `squared` parameter is deprecated
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 341
- PR merge metrics
- No merged PRs in 30d
Description
Using the MSE metric doesn't work with scikit-learn version >1.6.0 since the `squared` parameter is deprecated:
```
/home/joeran/repos/dragon_baseline/.venv/lib/python3.10/site-packages/sklearn/metrics/_regression.py:492: FutureWarning: 'squared' is deprecated in version 1.4 and will be removed in 1.6. To calculate the root mean squared error, use the function'root_mean_squared_error'.
```
(as confirmed here: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/metrics/_regression.py#L510)
Code to reproduce:
```
pip install scikit-learn==1.6.2
```
```python
import evaluate
metric = evaluate.load("mse")
metric.compute(predictions=(0,1,2), references=(1,2,3))
```
Contributor guide
Assessment
This issue has not been assessed yet.