Estimating linear regression with Gradient Descent (Steepest Descent)

前端 未结 2 1052

Example data

X<-matrix(c(rep(1,97),runif(97)) , nrow=97, ncol=2)
y<-matrix(runif(97), nrow= 97 , ncol =1)

I have succeed in creating

2条回答
  •  失恋的感觉
    2021-01-16 14:05

    The crossprod makes it surprisingly slower then the previous methods :

    Previous method (14 secs mean on 50 iterations):

    Crossprod method (16 secs mean on 50 iterations):

提交回复
热议问题