[問題] 關於gradient decent

作者: eryu (*+Red)   2021-05-27 19:45:09
請問關於 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
作者: TitanEric (泰坦)   2021-05-28 13:03:00
可以貼個code嗎
作者: lycantrope (阿寬)   2021-05-28 13:08:00
你可以看個shape看中間矩陣運算有沒有不符合預期X 經過poly後shape直接變成(1460, 2) 讓w變成(2,1)
作者: eryu (*+Red)   2021-05-28 18:47:00
感恩,懂了~

Links booklink

Contact Us: admin [ a t ] ucptt.com