How to use datasets.fetch_mldata() in sklearn?

后端 未结 11 2143
半阙折子戏
半阙折子戏 2020-12-30 05:42

I am trying to run the following code for a brief machine learning algorithm:

import re
import argparse
import csv
from collections import Counter
from sklea         


        
11条回答
  •  北荒
    北荒 (楼主)
    2020-12-30 05:56

    I downloaded the dataset from this link

    https://github.com/amplab/datascience-sp14/blob/master/lab7/mldata/mnist-original.mat

    then I typed these lines

    from sklearn.datasets import fetch_mldata
    mnist = fetch_mldata('MNIST original', transpose_data=True, data_home='files')
    

    *** the path is (your working directory)/files/mldata/mnist-original.mat

    I hope you get it , it worked well for me

提交回复
热议问题