How does cosine similarity work?
Cosine similarity measures the angle between two vectors — the dot product divided by the product of their magnitudes. Here's what each part of the formula does.
Topics /
The most popular blog posts about math & algorithms on Hacker News. 266 posts.
Cosine similarity measures the angle between two vectors — the dot product divided by the product of their magnitudes. Here's what each part of the formula does.
When do music stars achieve fame, and how long does fame typically last?
Traditionally, mathematics research projects are conducted by a small number (typically one to five) of expert mathematicians, each of which are familiar enough with all aspects of the project that…
An exploration of numbers in JSON and various JSON implementations
UPDATE: I’ve written a new post with a new technique which is about 2.5x more efficient than this approach Chess notation has come a long way since descriptive notation, now we have nice and decipherable Standard Algebraic Notation, like Qxf7 (queen takes on f7) or Nf3 (knight takes on f3). This is a great text…
Summer of Math Exposition 3 - How does a computer/calculator compute logarithms?
Apple's effort to improve the UX of math.
I'm pretty sure that the 2FA codes generated by my bank's TOTP app have a bias towards the number 8 - because eight is an auspicious number. But is that just my stupid meaty brain noticing patterns where none exist? The TOTP algorithm uses HMAC, which in turn uses SHA-1. My aforementioned brain is not clever enough to…
Or how to find the largest power of 2 that divides x?
A deep dive into investigating and reducing the flutter distortion on the soundtrack of Steamboat Willie (1928).
I’ve been reading Pearl’s Causal Inference in Statistics , and one of the exercises poses this problem:
We recently made a Polylog video about a nonstandard way of understanding the P vs NP problem. As usual, our goal was to present an underrated idea in a broadly understandable way, while being slig…
You might think it’s unlikely for any interesting mathematics to arise from incense appreciation, but that’s only because you’re unfamiliar with the peculiar character of Muromachi (室町) era Japanese nobles. There has never been a group of people, in any time or place, who were so driven to display their sophistication…
An introduction to learned image compression using neural networks.
In 2019, Google and Cloudflare ran an experiment where they upgraded HTTPS for many "real users’ connections" to use post-quantum encryption. They then reported statistics on how affordable this was. Google had also run a similar experiment in 2016: "While it's still very early days for quantum computers, we're…
Backpropagation is the key algorithm that makes training deep models computationally tractable. For modern neural networks, it can make training with gradient descent as much as ten million times faster, relative to a naive implementation. That’s the difference between a model taking a week to train and taking 200,000…
In our previous post, we introduced how to utilize Discrete Event Simulation (DES) in PicoLisp. Now, let's explore another application: a railroad model…
I’ve never been good at playing football 1 . I started playing again last year and I have scored more own goals than goals for my team. Also, I support the RCD Espanyol 2 , which has spent last season in the second division and has miraculously ascended to the first division last week. And to be honest, I only watch…
I hope everyone had a good weekend. I went on a hike. It was great. Statistics One of my great school regrets, next to “taking three years of business...
For reasons beyond the scope of this entry, I have been investigating elliptical and ovoid shapes. The Wikipedia article for Moss’s egg has a link to a tutorial on Euclidean Eggs by Freyja Hreinsdóttir which (amongst other things) describes how to construct the “four point egg”. I think it is a nicer shape than Moss’s…
A programming model for spatial canvases
In the early 1990s, they were merely visualization aids in the study of mathematics. Gradually, the complexity and artistry of the images becomes an end itself.
Division is quite an expensive operation. For instance, latency of the 32-bit division varies between 10 and 15 cycles on the Cannon Lake CPU, and for Zen4 this range is from 9 to 14 cycles. The latency of 32-bit multiplication is 3 or 4 cycles on both CPU models.
Making math a daily habit
Visual and interactive introduction to 2D planes in 3D space.
This post contains two unrelated announcements. Firstly, I would like to promote a useful list of resources for AI in Mathematics, that was initiated by Talia Ringer (with the crowdsourced assistan…
A family of infinite sums that evaluate to rational numbers, sometimes integers, and and effective algorithm for finding the sum.