ML coding
Machine learning algorithms and model parts written from scratch in NumPy and PyTorch, as ML coding rounds ask.
Machine learning algorithms and model parts written from scratch in NumPy and PyTorch, as ML coding rounds ask.
3 write-ups
| Title |
|---|
| Logistic Regression Logistic regression in NumPy, from loops to a stable vectorized fit with the loss computed from logits, then softmax for many classes, with tests and the versus-neural-network question. |
| K-Nearest Neighbors K-nearest neighbors in NumPy: a distance matrix without loops, top-k with argpartition, deterministic ties, classification and regression, chunking for memory, and choosing k. |
| Naive Bayes Gaussian and multinomial naive Bayes in NumPy, from multiplied densities that underflow to vectorized log probabilities, with variance and Laplace smoothing and tests. |