- Understand basic descent methods by applying them to a toy model.
- Apply style rules for coding.
- Write a function leastsquares_gd that takes y and X and returns the least squares estimate calculated with gradient descent. Compare the outcomes of this function with the ones of the lm package and the ones from direct calculation. What is the influence of the stepsize? What is the influence of the number of gradient descent iterations? Are these two quantities connected?
- Write a function leastsquares_gd_bt that complements leastsquares_gd with a backtracking rule.
- Write a function leastsquares_cd that computes the least-squares estimator via coordinate descent. Compare all methods in terms of accuracy and speed.
- Create a fuction leastsquares_cd_pr that computes the least-squares estimator via coordinate descent and pre-computes as many quantities as possible.
Contact author for licensing options
- Johannes Lederer - Assistant Professor, University of Washington