Implement linear and logistic regression
UberMachine Learning Engineer · Technical ScreenLast updated
This question evaluates understanding and hands-on implementation of linear and logistic regression, testing competencies in prediction functions, loss formulation, gradient computation, gradient descent training, regularization, and model selection within the Machine Learning domain (supervised learning and statistical modeling).
Explain and implement linear regression and logistic regression from scratch.
Your answer should cover:
- The prediction function for each model
- The loss function
- How to compute gradients
- How training works with gradient descent
- Regularization
- The main differences between the two models and when to use each one
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.