跟讀練習: Ridge vs Lasso Regression, Visualized!!! - 通過影片學習英語口語
選擇練習模式
每種模式都會開啟全屏練習室。
86 句
如果句子過短或過長,請點選 Edit 進行調整。
1
Ridge, regression versus lasso regression, which one will survive?
2
StatQuest.
3
Hello, I'm Josh Starmer and welcome to StatQuest.
4
Today we're going to talk about ridge versus lasso regression and the differences are going to be visualized.
5
Note, this StatQuest assumes that you are already familiar with ridge and lasso regression.
6
If not, check out the quests.
7
To show you the difference between ridge and lasso regression, we're going to use a very simple data set that consists of weight and height measurements.
8
And we'll start by fitting this horizontal line to the data.
9
This horizontal line represents a terrible fit.
10
And we can measure how bad that fit is by calculating residuals, the difference between the observed and predicted values.
11
In order to compare the horizontal line to other lines fit to the data, we will plot the sum of the squared residuals on a graph.
12
The y-axis on this graph is the sum of the squared residuals,
13
and the x-axis represents different slope values for the fitted line.
14
In this case, the slope for the horizontal line is 0.
15
Now let's increase the slope to 0.2, and calculate a new value for the sum of the squared residuals.
16
Now let's increase the slope to 0.4, and calculate a new value for the sum of the squared residuals.
17
We can keep plugging in new values for the slope and plotting the sum of the squared residuals,
18
Or we can just plot the curve for this equation.
19
We can see that the best fitting line is at the bottom of the parabola.
20
In other words, when the slope equals 0.45, we get the lowest sum of the squared residuals.
21
In this example, we simply calculated the sum of the squared residuals for different slopes.
22
Now let's add the ridge regression penalty, aka the L2 norm.
23
if you asked me, it should be called the squared penalty, since that's what it is, and, for me, way easier to remember.
24
The thick blue line that we just drew represents lambda equals zero.
25
This is because when lambda equals zero, the penalty is equal to zero,
26
regardless of the slope, and we are left with the original sum of squared residuals.
27
Now let's see what happens when we set lambda equal to 10.
28
And just like before, we'll start with a horizontal line, only this time, the line is orange.
29
Just like before, we can calculate the residuals.
30
And we can calculate the sum of the squared residuals plus lambda times the slope squared.
31
In this case, lambda equals 10.
32
And the slope of the horizontal line is 0.
33
So the penalty is 0.
34
So we plot the sum of the squared residuals here.
35
Now let's increase the slope to 0.2.
36
Note, the residuals are smaller than before, so the sum of squared residuals is smaller than before.
37
But now the penalty is 0.4.
38
And that gives us this point on the graph.
39
Now let's increase the slope to 0.4.
40
And the residuals are even smaller.
41
But now the penalty is 1.6.
42
And that gives us this point on the graph.
43
And like we did before, we can keep plugging in new values for the slope and plotting the sum of the squared residuals plus the penalty,
44
or we can just plot the curve with a thick orange line that represents lambda equals 10.
45
The bottom of the parabola is where the slope gives us the lowest sum of squared residuals plus penalty,
46
and that corresponds to this specific line.
47
And when we compare that to the optimal slope when lambda equals zero,
48
we see that setting lambda equal to 10 results in a smaller optimal slope.
49
Note, we can also see that when lambda equals 10, the lowest point in the parabola is closer to zero than when lambda equals zero.
50
So, either way we look at it, we see that the larger value for lambda shrunk the optimal value for the slope.
51
Likewise, the thick green line represents lambda equals 20.
52
We see that the minimum value is closer to zero, and the optimal slope has shrunk some more.
53
The purple lines represent lambda equals 40, and it shrinks the slope even more.
54
In other words, as we increase lambda for the ridge regression penalty, a.k.a the L2 penalty, a.k.a the square penalty,
55
The optimal slope gets closer and closer to zero, but it does not equal zero.
56
Bam!
57
Now let's see what happens if we use the lasso penalty, a.k.a the L1 norm, or, if you asked me,
58
I'd call it the absolute value penalty.
59
Unfortunately, no one asked me.
60
Again, the thick blue line represents lambda equals zero, so there is no extra penalty.
61
This is because when we plug lambda equals zero into the equation, the penalty becomes zero.
62
And we are left with the original sum of the squared residuals.
63
Note, just like before, we'll keep track of the best fitting line plus penalty in this graph on the left.
64
The thick orange line represents lambda equals 10, so now we are turning on the penalty and shrinking the slope.
65
When lambda equals 10, we start to see a kink in the curve where the slope is 0.
66
The thick green line represents lambda equals 20, and this kink at zero is becoming more prominent.
67
Lastly, the thick purple line represents lambda equals 40.
68
And now the kink at zero is super obvious.
69
Now the lowest point in the purple curve,
70
aka the optimal slope given the absolute value penalty when lambda equals 40, is zero.
71
And that means the slope of the optimal line is 0.
72
And that means when lambda equals 40, we ignore weight as a variable when predicting height.
73
Double bam!
74
In summary, when we increase the ridge regression penalty, a.k.a the L2 penalty, a.k.a the square penalty,
75
the optimal slopes shift towards zero, but we retain a nice parabola shape.
76
And even when we set lambda to something crazy high like 400, we still end up with an optimal value greater than zero.
77
In contrast, when we increase the lasso penalty, a.k.a the L1 penalty, a.k.a the absolute value penalty,
78
The optimal value shifts towards zero, but since we have a kink at zero, zero ends up being the optimal slope.
79
Bam!
80
Hooray!
81
We've made it to the end of another exciting StatQuest.
82
If you like this StatQuest and want to see more, please subscribe.
83
And if you want to support StatQuest, consider contributing to my Patreon campaign,
84
becoming a channel member, buying one or two of my original songs or a t-shirt or a hoodie or just donate.
85
The links are in the description below.
86
All right, until next time, quest on!
同頻道
FOR YOU
推薦影片
本課的詞彙與口語要點
這節口語課以影片“Ridge vs Lasso Regression, Visualized!!!”為素材。 影片中反覆出現的詞有:slope, penalty, lambda, equal, zero。 這段影片共有 86 個句子、1111 個單詞可供跟讀。 講話部分時長為 9:04。 說話人語速平穩,每分鐘約 122 個詞,很適合跟讀。 只有 70% 的單詞屬於英語最常用的 3,000 詞,詞彙難度較高。
影片中的重點詞彙
影片中 15 個值得學習的單詞,附發音和釋義:
| 單詞 | 發音 | 釋義 |
|---|---|---|
| slope 名詞 | /sloʊp/ | 斜坡, 坡 |
| penalty 名詞 | /ˈpɛn.əl.ti/ | 懲罰 /懲罰 |
| optimal 形容詞 | /ˈɑptɪməl/ | 最佳的 |
| thick 形容詞 | /θɪk/ | ху, 厚 |
| ridge 名詞 | /ɹɪd͡ʒ/ | 背脊 |
| horizontal 形容詞 | /ˌhoɹəˈzɑn.təl/ | 水平, 橫的 /橫的 |
| calculate 動詞 | /ˈkælkjʊleɪt/ | 計算 /計算, 算 |
| graph 名詞 | /ɡɹæf/ | 圖表 /圖表 |
| curve 名詞 | /kɚv/ | 彎子 /彎子 |
| purple 名詞 | /ˈpɝ.pl̩/ | 紫色 |
| plug 名詞 | /plʌɡ/ | 插頭 /插頭 |
| compare 動詞 | /kəmˈpɛɚ/ | 比, 比較 /比較 |
| versus | /ˈvɝsəs/ | 對 /對 |
| quest 名詞 | /kwɛst/ | 探索, 尋求 /尋求 |
| predict 動詞 | /pɹɪˈdɪkt/ | 預言 /預言 |
影片中出現的短語動詞
| 單詞 | 釋義 |
|---|---|
| check out 動詞 | 退房 |
| end up 動詞 | 到達 |
影片中的語法
說話人最常用的結構,並附上影片中的原話:
| 結構 | 影片中的用法 |
|---|---|
| 被動語態 be + 過去分詞 — 強調發生了什麼,而不是誰做的 | be visualized · should be called · are left |
| 現在完成時 have/has + 過去分詞 — 過去發生但與現在仍有關聯的事 | has shrunk · We've made |
需要注意的發音
說話人用了 8 次縮略和弱讀形式,例如 we'll, we're, I'd。請按聽到的簡短形式來說。
- “sh” 和 “zh” 音: equation /ɪˈkweɪ.ʒən/, contrast /kənˈt(ʃ)ɹæst/, measurement /ˈmɛʒ.ə.mənt/, regression /ɹiːˈɡɹɛʃ.ən/, visualize /ˈvɪʒuəˌlaɪz/
- 長單詞——注意重音位置: residual /ɹɪˈzɪd͡ʒ.u.əl/, horizontal /ˌhoɹəˈzɑn.təl/, parabola /pəˈɹæb.ə.lə/
中文母語者容易讀錯的音:
- /v/ — 不要讀成 /w/,上齒輕觸下唇: curve /kɚv/, versus /ˈvɝsəs/, variable [ˈvæɹ.i.ə.bl̩], observe /əbˈzɜːv/, visualize /ˈvɪʒuəˌlaɪz/
- 詞尾子音 — 要讀清楚,後面不要加母音: slope /sloʊp/, thick /θɪk/, ridge /ɹɪd͡ʒ/, calculate /ˈkælkjʊleɪt/, graph /ɡɹæf/
- /r/ 和 /l/ 的區別: residual /ɹɪˈzɪd͡ʒ.u.əl/, horizontal /ˌhoɹəˈzɑn.təl/, regardless /ɹɪˈɡɑɹd.lɪs/, variable [ˈvæɹ.i.ə.bl̩], parabola /pəˈɹæb.ə.lə/
如何用這段影片練習
- 先完整聽一遍影片,不要開口,記下不認識的單詞。
- 用正常速度逐句跟讀,每句重複到你的節奏與說話人一致為止。
- 錄下自己的聲音並與原聲對比,特別注意 slope, penalty, optimal 這類單詞。
什麼是跟讀法?
跟讀法 (Shadowing) 是一種有科學依據的語言學習技巧,最初開發用於專業口譯員的培訓,並由多語言者Alexander Arguelles博士普及。這個方法簡單而強大:您在聽英語母語原聲的同時立即大聲重複——就像是一個延遲1-2秒緊跟說話者的影子。與被動聽力或語法練習不同,跟讀法強迫您的大腦和口腔肌肉同時處理並模模擬實的講話模式。研究表明它能顯著提高發音準確性,語調,節奏,連讀,聽力理解和口語流利度——使其成為雅思口語備考和真實英語交流最有效的方法之一。
















