Algorithms

Newton-Gregory Interpolation

7 minute read

Interpolate equally-spaced data efficiently and discover its connection to Taylor series.

BKM

7 minute read

Compute logarithms and exponentials without a floating point unit.

CORDIC

12 minute read

Compute sine, cosine, and exponentials using only addition, subtraction, and bit shifts.

The AAA Algorithm

9 minute read

Fit rational functions to data with poles and discontinuities where polynomials fail.

Tanhsinh Quadrature

8 minute read

Tackle tricky integrals with endpoint singularities using a clever variable transformation.

Lagrange Interpolation

5 minute read

Approximate functions using polynomial interpolation without solving linear systems.

Back to top ↑

Optimization

Loss Spikes in Gradient Descent

11 minute read

Loss spikes aren’t noise. They’re gradient descent briefly exceeding the edge of stability and snapping back. Here’s why.

Robust Regression Without Gradients

10 minute read

L1 regression is more robust to outliers than least squares, but harder to solve. We walk through four algorithms, each addressing a limitation of the previo...

Golden Section Search for Robust Regression

9 minute read

Golden section search reuses objective evaluations to efficiently minimize 1D functions. Learn how this classical algorithm connects to the golden ratio and ...

Lagrange Duality

8 minute read

Derive and interpret the dual form of an optimization problem.

Quadratic Penalty Algo

6 minute read

Solve constrained optimization problems using your favorite unconstrained solver.

Nonlinear Least Squares

12 minute read

Fit nonlinear models using Gauss-Newton and Levenberg-Marquardt algorithms.

Back to top ↑

Visualization

Plotting Ellipses

6 minute read

Plot ellipses using conic, quadratic, and parametric representations.

Back to top ↑

Machine Learning

Back to top ↑

Statistics

Back to top ↑