機器學習 - R平方(R Squared)
介紹
- 自變量不論是否改變,都不會影響總平方和,故分母不變
- 斜直線落在哪,會改變,即改變殘差平方和,故分子會改變
若小(斜線上和所有點差距小),不變,大
若大(斜線上和所有點差距大不理想),不變,小
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
調整R平方(Adjusted R Squared)
前言
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
原因:
假設應變量為薪水,自變量為工作年資、為證照數
是合適的自變量,可解釋應變量與自變量的關係,殘差平方和會變小,變大
假設為身分證第一碼,與應變量沒任何關係,,殘差平方和不變,不變
介紹
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
- 為了解決自變量不斷盲目增加,使不斷變小,不斷變大的情況
- 方程式:
p:number of regressors 自變量個數
n:sample size 資料個數
- 自變量變多不一定是好的
若變大,其他參數不變,變小
- 看與
若變大能使變更小,變大,變小,變大
與互相拉扯
結論:
- 自變量個數增加,若能使上升幅度足夠【影響】,則變大
- 自變量個數增加,若上升幅度不足夠,則變小