深度之眼-西瓜书课后代码
import time
import matplotlib.pyplot as plt
import numpy as np
from sklearn.datasets import fetch_openml
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.utils import check_random_state
print(__doc__)
t0 = time.time()
train_sample = 5000
x,y = fetch_openml('mnist_784',version=1,return_X_y=True)
random_state = check_random_state(0)#设置随机种子
permutation = random_state.permutation