Your question is Implement Classic ML Algorithms. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
Implement some of the classic machine learning algorithms.
Choose at least three supervised or unsupervised algorithms, implement their core training and prediction logic without calling an equivalent estimator, and evaluate them on appropriate datasets. Include numerical stability, input validation, configurable hyperparameters, and a comparison with trusted reference implementations where available. Explain the objective function, optimization method, computational complexity, and key failure modes for each algorithm.