1
Good afternoon, I am trying to import a mnist dataset but when I enter this code:
# importar as bibliotecas necessárias
from sklearn.datasets import fetch_mldata
import matplotlib.pyplot as plt
import numpy as np
import the MNIST dataset
dataset = fetch_mldata("MNIST_Dataset")
(data, labels) = (dataset.data, dataset.target)
The following message appears stating that the function has been deprecated to version 0.2 and removed in 0.22
C:\Users\rferr\Anaconda3\lib\site-packages\sklearn\utils\deprecation.py:77: DeprecationWarning: Function fetch_mldata is deprecated; fetch_mldata was deprecated in version 0.20 and will be removed in version 0.22
warnings.warn(msg, category=DeprecationWarning)
C:\Users\rferr\Anaconda3\lib\site-packages\sklearn\utils\deprecation.py:77: DeprecationWarning: Function mldata_filename is deprecated; mldata_filename was deprecated in version 0.20 and will be removed in version 0.22
warnings.warn(msg, category=DeprecationWarning)
I tried to import by fetch_openml but could not tbm.
What I’m doing wrong and how I fix it?
Grateful for the attention.
Understand that everything that is depreciated and "wrong", that is, there is a better way to do the same thing that function does. In short, deprecated functions are a warning that it will be removed in future versions, giving developers time to adapt their code to this new form.
– Luis Eduardo