Skip to Content
深度學習|內行人的做法
book

深度學習|內行人的做法

by Josh Patterson, Adam Gibson
January 2019
Beginner to intermediate
576 pages
14h 31m
Chinese
GoTop Information, Inc.
Content preview from 深度學習|內行人的做法
機器學習的工作原理
|
27
所謂的「
套入
fitting
)」,就是定義一個函數 f(x),設法讓它所生成的 y 值很接近量測
值或真實世界的 y 值。由 y = f(x) 所生成的直線,與自變數和因變數所構成的散點圖,
應該會非常接近才對。
線性迴歸模型
我們可以把這個函數與之前的方程式 Ax = b 相關聯起來,其中 A 代表的是我們想要模
型化的所有輸入樣本的特徵(例如「體重」或「坪數」)。每一筆輸入資料,就是矩陣 A
其中的一個橫行。縱列向量 b 就是矩陣 A 中所有輸入資料所對應的結果。只要運用誤差
函數和最佳化方法(例如 SGD 隨機梯度遞減法),我們就可以找到一組參數 x,讓所有
預測與真實結果之間的誤差達到最小化的效果。
如前所述,如果要使用 SGD 來求解參數向量
x
,就必須準備好三個東西:
對於資料所做出的假設
參數向量 x 和輸入特徵 A 的內積(如前所示)
成本函數
預測的平方誤差(誤差 = 預測值 實際值)
更新函數
平方誤差損失函數(也就是成本函數)的導函數
線性迴歸可用來處理線性的關係,但如果不只是線性的關係,則可套入非線性曲線,其
中最常用的就是 x 指數大於 1 的曲線(這就是「機器學習」有時會被稱為「曲線套入」
的理由)。所謂的絕對套入,就表示我們所套入的曲線會穿過散佈圖上的每一個點。吊
詭的是,絕對套入通常是非常糟糕的結果,因為這也就表示,你的模型針對訓練組資料
訓練的結果太過於完美,這樣一來如果遇到沒看過的資料,反而幾乎毫無預測能力(也
就是毫無通用性);關於這點,我們之前就已經說明過了。 ...
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

高效能網站建置指南

高效能網站建置指南

Steve Souders
初探深度學習|使用TensorFlow

初探深度學習|使用TensorFlow

Reza Zadeh, Bharath Ramsundar
深度学习实战

深度学习实战

Douwe Osinga

Publisher Resources

ISBN: 9789865020262