未验证 提交 3339b8af 编写于 作者: Z ZTFrom1994 提交者: GitHub

Update 3.分类.md

测试集应该是前60000条记录,这里应该是误写成6000了,还有一处代码 sgd_clf.classes[5]应为sgd_clf.classes_[5] 前面的少了一个下划线。
上级 8fbb4792
...@@ -67,7 +67,7 @@ plt.show() ...@@ -67,7 +67,7 @@ plt.show()
![图3-1](../images/chapter_3/chapter3.2.jpeg) ![图3-1](../images/chapter_3/chapter3.2.jpeg)
先等一下!你总是应该先创建测试集,并且在验证数据之前先把测试集晾到一边。MNIST 数据集已经事先被分成了一个训练集(前 6000 张图片)和一个测试集(最后 10000 张图片) 先等一下!你总是应该先创建测试集,并且在验证数据之前先把测试集晾到一边。MNIST 数据集已经事先被分成了一个训练集(前 60000 张图片)和一个测试集(最后 10000 张图片)
```python ```python
X_train, X_test, y_train, y_test = X[:60000], X[60000:], y[:60000], y[60000:] X_train, X_test, y_train, y_test = X[:60000], X[60000:], y[:60000], y[60000:]
...@@ -474,7 +474,7 @@ array([[-311402.62954431, -363517.28355739, -446449.5306454 , ...@@ -474,7 +474,7 @@ array([[-311402.62954431, -363517.28355739, -446449.5306454 ,
5 5
>>> sgd_clf.classes_ >>> sgd_clf.classes_
array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.]) array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
>>> sgd_clf.classes[5] >>> sgd_clf.classes_[5]
5.0 5.0
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册