Multilabel Classification FutureWarning with KNeighborsClassifier.predict()
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 14.1k
- Forks
- 5.3k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
In the Multilabel Classification section, the following code generates a warning:
```python
knn_clf.predict([some_digit])
```
The warning is:
```
[c:\tools\Anaconda3\lib\site-packages\sklearn\neighbors\_classification.py:228](file:///C:/tools/Anaconda3/lib/site-packages/sklearn/neighbors/_classification.py:228): FutureWarning: Unlike other reduction functions (e.g. `skew`, `kurtosis`), the default behavior of `mode` typically preserves the axis it acts along. In SciPy 1.11.0, this behavior will change: the default value of `keepdims` will become False, the `axis` over which the statistic is taken will be eliminated, and the value None will no longer be accepted. Set `keepdims` to True or False to avoid this warning.
mode, _ = stats.mode(_y[neigh_ind, k], axis=1)
```
I verified I have the latest repo code.
**Versions:**
- OS: Windoows 11
- Python: 3.9.13
- Scikit-Learn: 1.0.2
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.