optimg(data = data, par = c(0,0), fn=SSE, method = "STGD")$par
[1] 3.37930046 0.06683237
$value
[1] 959.4293
$counts
[1] 6
$convergence
[1] 0
Not graded, just practice
Questions 6-9 refer to the code and output below, performing gradient descent with optimg:
optimg(data = data, par = c(0,0), fn=SSE, method = "STGD")$par
[1] 3.37930046 0.06683237
$value
[1] 959.4293
$counts
[1] 6
$convergence
[1] 0
How many steps did the gradient descent algorithm take?
What was the sum of squared error of the optimal paramters?
What coefficients does the algorithm converge on?
Questions 10-12 refer to the output below from lm():
Call:
lm(formula = y ~ x, data = data)
Coefficients:
(Intercept) x
3.37822 0.06688
y ~ x # this works (implicit intercept)
y ~ 1 + x # this also works (explicit intercept)Given the model is specified by the equation \(y = w_0+w_1x_1\), what is the parameter estimate for \(w_0\) = and \(w_1\) = .
True or false, for this model, optimg() with gradient descent would converge on the same parameter estimates?