This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## 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 |