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 ↑

Numerical methods

Newton-Gregory Interpolation

7 minute read

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

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 ↑

Iterative methods

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.

Nonlinear Least Squares

12 minute read

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

Back to top ↑

Python

Plotting Ellipses

6 minute read

Plot ellipses using conic, quadratic, and parametric representations.

Back to top ↑

Interpolation

Newton-Gregory Interpolation

7 minute read

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

The AAA Algorithm

9 minute read

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

Lagrange Interpolation

5 minute read

Approximate functions using polynomial interpolation without solving linear systems.

Back to top ↑

Approximation theory

Newton-Gregory Interpolation

7 minute read

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

The AAA Algorithm

9 minute read

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

Lagrange Interpolation

5 minute read

Approximate functions using polynomial interpolation without solving linear systems.

Back to top ↑

Fixed-point arithmetic

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.

Back to top ↑

Numerical computing

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.

Back to top ↑

Least squares

The AAA Algorithm

9 minute read

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

Nonlinear Least Squares

12 minute read

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

Back to top ↑

Regression

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...

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 ↑

Matplotlib

Plotting Ellipses

6 minute read

Plot ellipses using conic, quadratic, and parametric representations.

Back to top ↑

Constrained optimization

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.

Back to top ↑

Machine Learning

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...

Back to top ↑

Machine learning

Back to top ↑

Decision trees

Back to top ↑

Linear algebra

Plotting Ellipses

6 minute read

Plot ellipses using conic, quadratic, and parametric representations.

Back to top ↑

Duality

Lagrange Duality

8 minute read

Derive and interpret the dual form of an optimization problem.

Back to top ↑

Numerical integration

Tanhsinh Quadrature

8 minute read

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

Back to top ↑

Quadrature

Tanhsinh Quadrature

8 minute read

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

Back to top ↑

Rational approximation

The AAA Algorithm

9 minute read

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

Back to top ↑

Trigonometry

CORDIC

12 minute read

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

Back to top ↑

Finite differences

Newton-Gregory Interpolation

7 minute read

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

Back to top ↑

Statistics

Back to top ↑

Correlation

Back to top ↑

Nonparametric methods

Back to top ↑

Floating point

Back to top ↑

Gradient Descent

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.

Back to top ↑