作者eryu (*+Red)
看板Python
标题[问题] 关於gradient decent
时间Thu May 27 19:45:09 2021
请问关於 ML 的问题.如图中X取到指定的column,
但是为什麽图二def gradient_decent()里面的
n=X.shape[1] 以及 random 产生出来的数目n 会有2个值呢?
原本取出来的housing['GrivlArea']不是一个N by 1的array吗?
他是怎麽判断出会有两个值的呀?
https://imgur.com/a/Q3OlYXc
https://imgur.com/a/o5AKcT4
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.241.176.185 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1622115911.A.842.html
1F:→ TitanEric: 可以贴个code吗 05/28 13:03
2F:推 lycantrope: 你可以看个shape看中间矩阵运算有没有不符合预期 05/28 13:08
3F:推 lycantrope: X 经过poly後shape直接变成(1460, 2) 让w变成(2,1) 05/28 14:49
4F:→ eryu: 感恩,懂了~ 05/28 18:47