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 精通機器學習
74
|
第二章:端對端機器學習專案
約束它
將它正則化
),
或取得更多訓練資料
但是在你更深入瞭解隨機森林之前
你應該先嘗試各種機器學習演算法的模型
例如使用不同種類的
kernel
的支援向量
是一些神經網路
),
不要花太多時間在調整超參數上面
你的目標是選出幾個
到五個
有希望的模型
你應該將你實驗過的每一個模型儲存起來
以便將來輕鬆地回來使用任何
一種模型
你一定要儲存超參數與訓練後的參數
以及交叉驗證分數
許也要儲存實際的預測
這可讓你輕鬆地比較各種模型的分數
以及比較
它們的誤差類型
你可以使用
Python
pickle
模組來儲存
Scikit-Learn
也可以使用
joblib
程式庫
它可以更高效地將大型的
NumPy
陣列序
列化
你可以用
pip
來安裝這個程式庫
):
import joblib
joblib.dump(my_model, "my_model.pkl")
#
並且在稍後
...
my_model_loaded = joblib.load("my_model.pkl")
微調模型
假設你已經有一些看起來有希望的模型了
現在你需要微調它們
我們來看一些做法
網格搜尋
有一種做法是手動修改超參數
直到找到最棒的超參數值組合為止
這是一個非常枯燥的
工作
你可能沒有時間探索許多組合
你可以改成用
Scikit-Learn
GridSearchCV
來幫你尋找
你只要告訴它
你希望它試驗的
超參數有哪些
以及要用哪些值來嘗試
它就會用交叉驗證來評估所有可能的超參數值組
例如
下面的程式可找出 ...
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