Scikit learn linear regression - learning rate and epoch adjustment
A linear regression model $y=\beta X+u$ can be solved in one &quot;round&quot; by using $(X'X)^{-1}X'y=\hat{\beta}$. It can also be solved using gradient descent but there is no need to adjust something like a learning rate or the number of epochs since the solver (usually) converges without much trouble.
Here is a minimal example in R:
x0 &lt;- c(1,1,1,1,1) 
x1 &lt;- c(1,2,3,4,5)
x2 &lt;- c(8,4,3,1,8)
x &lt;- as.matrix(cbind(x0,x1,x2))
y &lt;- as.matrix(c(3,7,5,11,14))

x
y

# (X'X)^-1 X'y
beta1 = solve(t(x)%*%x) %*% t(x)%*%y 

# R's regression command
beta2 = summary(lm(y ~ x[, 2:3]))

# Gradient decent
m &lt;- nrow(y)
grad &lt;- function(x, y, theta) {
  gradient &lt;- (1/m)* (t(x) %*% ((x %*% t(theta)) - y))
  return(t(gradient))
}

# define gradient descent update algorithm
grad.descent &lt;- function(x, maxit){
  theta &lt;- matrix(c(0, 0, 0), nrow=1) # Initialize the parameters
  
  alpha = .05 # set learning rate
  for (i in 1:maxit) {
    theta &lt;- theta - alpha  * grad(x, y, theta)   
  }
  return(theta)
}

# results without feature scaling
print(grad.descent(x,2000))
beta1
beta2