Turn any binary scorer into a multiclass classifier: train one model per class (that class vs everything else) and predict the class whose model is most confident.
Implement:
fit_logistic(X, y, lr=0.1, epochs=500): binary logistic regression by full-batch gradient descent from zeros, returning (w, b)OneVsRest().fit(X, y) and .predict(X): use fit_logistic for each class (in sorted order) and pick the class with the highest score X @ w + b