Skip to Content
精通機器學習
book

精通機器學習

by Aurélien Géron
April 2020
Intermediate to advanced
816 pages
18h 32m
Chinese
GoTop Information, Inc.
Content preview from 精通機器學習
106
|
第三章:分類
左邊是有雜訊的輸入圖片
右邊是乾淨的目標圖片
接著我們要訓練分類器
讓它清理這
張圖片
knn_clf.fit(X_train_mod, y_train_mod)
clean_digit = knn_clf.predict([X_test_mod[some_index]])
plot_digit(clean_digit)
看起來很接近目標
我們的分類之旅在此結束
你現在應該知道如何幫分類任務選擇正確
的評量標準
選擇適當的
precision/recall
比較分類器
以及為各種任務建立良好的分類
系統了
習題
1. 試著為 MNIST 資料組建立一個分類器,讓它在處理測試組時,有超過 97% 的準確
度。提示:
KNeighborsClassifier
很適合這項任務,你只要找到好的超參數值就可以
了(試著對
weights
n_neighbors
超參數進行網格搜尋)。
2. 寫一個可以將 MNIST 圖片往任何方向移動(左、右、上、下)一個像素的函式
5
接著,為訓練組的每一張圖片建立四張移動過的複本(每個方向一張),並將它們加
入訓練組。最後,用這個擴展過的訓練組來訓練你的最佳模型,並且用測試組評量
它的準確度。你應該可以看到,模型的表現更好了!這項人工擴展訓練組的技術稱
資料擴增
data
augmentation
)或
訓練組擴展
training
set
expansion
)。
3. 處理 Titanic 資料組。Kaggle 是很棒的起點(
https://www.kaggle.com/c/ti ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

下一代空间计算:AR与VR创新理论与实践

下一代空间计算:AR与VR创新理论与实践

Erin Pangilinan, Steve Lukas, Vasanth Mohan
C语言核心技术(原书第2版)

C语言核心技术(原书第2版)

Peter Prinz, Tony Crawford

Publisher Resources

ISBN: 9789865024345