RSSAmplifier

Blog

Geo’s Notepad

Mostly Programming and Math

geo-ant.github.ioRSS feed ↗10 posts

Latest posts

Powell’s Dogleg for Least Squares Minimization from Scratch

I’ve recently released the Rust dogleg crate and I thought I’d document everything that’s needed to implement a least-squares Dogleg optimizer from scratch. You probably don’t want to do that, but if you did, then here’s everything you need to know.

A Simple Image Brightness And Contrast Adjustment Technique

I recently found myself squinting at two images at work and wondering if one is actually “better” than the other. The two images were showing the same object, but they had slightly but noticeably different value ranges. That made it hard for me to understand which of the differences were due to display brightness and contrast settings and which were part of the actual structure of the image. Then…

A Skateboard Isn’t a Vertical Slice of a Car But It Should Be

It’s been one too many times that I’ve seen the famous skateboard, scooter, bike, motorcycle, and car image by Henrik Kniberg, which he says is about (agile) “product development in general”. I’ve finally figured out what bothers me about it so much. I’ll argue that the underlying mental model is at best not helpful and at worst actively misleading for product development, despite the article…

Sample Size Calculations for Binomial Distributions

Say we have a sequence of independent Bernoulli experiments and we want to make claims about the true probability of success, given our observations. How many trials do we need to make claims about the true probability with a certain confidence? Let’s derive this from first principles.

A Tale of Testability and Sending Non-Send Types in Rust

This is a story of testability, multithreading, and the age old question of how do we send a !Send type in Rust. I’ll explore how (not) to do this, while rambling on about how writing obsessively testable code leads to better design. Hot takes incoming.

Solving Variable Projection with QR Decomposition

This article continues the series on Variable Projection and explains how to rewrite the problem using QR decomposition, rather than the more computationally expensive singular value decomposition (SVD).

Cursed Linear Types In Rust

Inspired by Jack Wrenn’s post on Undroppable Types in Rust, I set out to see if it’s possible to create types that must be used exactly once. From my understanding, those things are called linear types, but don’t quote me on that1. Unless you are quoting the title of this article which explicitly says linear types… I feel stupid now.

Rethinking Builders… with Lazy Generics

While using compile-time builder generator crates, I realized that I had run into a niche problem that required lot more flexibility with generic structs and functions than I was getting. If you like, follow me down a rabbit hole and explore the builder pattern from a very generic-centric perspective.

The Covariance Matrix for Variable Projection with Multiple Right Hand Sides

In this article, I explore how to efficiently calculate the covariance matrix of the best fit parameters for global fitting problems that use the variable projection (VarPro) algorithm. It’s a very niche topic, but I do need it for my open source library so I might as well write it down. It might be helpful for people looking to gain a deeper understanding of the math behind VarPro.

Nonlinear Least Squares Fitting - A Bayesian Tutorial

In this article, we’ll derive from scratch the well known formulas –and some not so well known ones– for nonlinear least squares fitting from a Bayesian perspective. We’ll be using only elementary linear algebra and elementary calculus. It turns out, that this is a valuable exercise, because it allows us to clearly state our assumptions about the problem and assign unambigous meaning to all…