Skip to content

Instantly share code, notes, and snippets.

View beyhangl's full-sized avatar
🎯
Focusing

Beyhan Gül beyhangl

🎯
Focusing
  • Turkey
View GitHub Profile
##
## Linear regression by gradient descent
##
## A learning exercise to help build intuition about gradient descent.
## J. Christopher Bare, 2012
##
# generate random data in which y is a noisy function of x
x <- runif(1000, -5, 5)
y <- x + rnorm(1000) + 3