机器学习 August 19, 2018

5-3 MNIST数据集

Words count 3.2k Reading time 3 mins.

import numpy as np
from sklearn.datasets import fetch_mldata
mnist = fetch_mldata("MNIST original...
Read article

机器学习 August 19, 2018

5-3 MNIST数据集

Words count 3.2k Reading time 3 mins.

import numpy as np
from sklearn.datasets import fetch_mldata
mnist = fetch_mldata("MNIST original",data_home="/Users/shirukai/Desktop/MachineLearn/datasets/")
mnist
{'COL_NAMES': ['label', 'data'],
 ...
Read article

机器学习 August 19, 2018

2-2 测试算法

Words count 27k Reading time 24 mins.

import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets
iris = datasets.load_iris()
X = iris.data
y = iris.target
X.shape
(150, 4)
y.shape
(150,)
y.reshape(1,-1)
array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
Read article
0%