Image from Wednesday!
Image from Wednesday!
Image from Wednesday!
Update from Tumblr: Wednesday!
https://temporalecology.tumblr.com/post/802756052302135296
@betanalpha.bsky.social
Zealous modeler. Annoying statistician. Reluctant geometer. Support my writing at http://patreon.com/betanalpha. He/him.
Image from Wednesday!
Image from Wednesday!
Image from Wednesday!
Update from Tumblr: Wednesday!
https://temporalecology.tumblr.com/post/802756052302135296
Maybe if you're into functional programming. My imperative/object-oriented ass is less of a fan. π€£
12.12.2025 17:57 β π 1 π 0 π¬ 0 π 0I would absolutely take a global rebalancing operation and then be happy to assume that split-join-join or the like is the more efficient approach; I just haven't seen one presented yet!
11.12.2025 21:10 β π 0 π 0 π¬ 0 π 0Is there a global rebalancing operation that works for any red-black tree with potential black-heigh violations? I'm mostly working from Cormen (4th ed) and Wikipedia which largely focus on operations that preserve an initially valid tree and the local fixes needed to implement those operations.
11.12.2025 21:10 β π 0 π 0 π¬ 1 π 0Sort of. Here the internal and leaf nodes feature different notions of key; there's still a natural ordering and most operations work as expected provided that the leaf nodes remain leaf nodes and vice versa. Otherwise the internal nodes can mix arbitrarily.
11.12.2025 21:06 β π 0 π 0 π¬ 0 π 0<drops head in shame> R.
It's mostly a pedagogical exercise, and I'm using R6 classes to get objects with reference semantics so that the code is reasonably equivalent to what I'd do in C++.
The worst part is that all of the Fortune's algorithm references just say "rebalance" with zero detail as if it's a trivial operation. π
11.12.2025 18:13 β π 1 π 0 π¬ 2 π 0I'm trying to figure out if there's a simpler rebalancing operation that would work for the particular subtree expansion operation. Wouldn't be surprised if there isn't, but I'm not experienced enough to try to derive one myself.
11.12.2025 18:13 β π 0 π 0 π¬ 1 π 0I've gotten balanced split/join operations to work, but here they're kind of ungainly because you have to split the initial tree into three parts then append the subtree and then join twice.
11.12.2025 18:13 β π 0 π 0 π¬ 1 π 0Running insert-fixup on each node of the new nodes does give a balanced tree, but every now and then it will sneak leaf nodes to internal nodes which isn't a valid tree for the Fortune algorithm application.
11.12.2025 18:10 β π 0 π 0 π¬ 1 π 0This appending is straightforward with manipulation of parent/child data but, of course, no guarantee that black-depth will be preserved. The insert-fixup operation isn't quite right because it assumes starting at a node with no non-nil children, and hence ignores any black-height underneath a node.
11.12.2025 18:09 β π 1 π 0 π¬ 1 π 0It's not quite a merge -- for context I'm implementing Fortune's algorithm where the binary tree expands by replacing an existing leaf node with a subtree, so there's one node of overlap relative to a pure merge.
11.12.2025 18:07 β π 0 π 0 π¬ 2 π 0Anybody experienced with red-black binary search trees and open to a few questions, or know anyone who is?
11.12.2025 04:07 β π 0 π 1 π¬ 2 π 0*There are some subtleties that might complicate things, in particular needing to keep the (non-nil) leaf nodes of the appended subtree (non-nil) leaf nodes of the balanced subtree. I can go into the proper details if it helps!
11.12.2025 04:51 β π 0 π 0 π¬ 1 π 0Haha, well implementing balancing? Trying to figure out if there's a way to append a subtree to a (non-nil) leaf node and then balance using the basic insert and delete fixup operations. Worst case I can do it with enough split and join operations, but that's ungainly as hell.
11.12.2025 04:48 β π 0 π 0 π¬ 1 π 0Anybody experienced with red-black binary search trees and open to a few questions, or know anyone who is?
11.12.2025 04:07 β π 0 π 1 π¬ 2 π 0I saw him in grad school after working through the book and it's wild how meticulous he is, down to the empty pockets and hand control, and how that translates to the overall experience.
10.12.2025 17:26 β π 1 π 0 π¬ 0 π 0I'm not going to step into the recent zeitgeist of bad visualization takes, but I will remind everyone that the absolute best reference on good plot design (and so much more) is still www.principiae.be/X0100.php.
10.12.2025 17:00 β π 8 π 0 π¬ 1 π 05 dimensions being high-dimensional, with intuitions from 1 and 2 dimensional spaces utterly failing, is a pretty good rule of thumb.
09.12.2025 17:59 β π 22 π 3 π¬ 0 π 0All models are great if you donβt check assumptions.
09.12.2025 17:56 β π 6 π 2 π¬ 0 π 0A photo of the 8087 die under a microscope. The die is rectangular, with complex patterns in purplish-brown. The patterns consist of rectangular regions, striped regions in the bottom half of the chip, and other more irregular regions. At the right, two regions are highlighted in red: the registers and the stack control circuitry. Around the edges of the die, you can see the hair-thin bond wires that connect the chip to its 40 external pins. The complex patterns on the die are formed by its metal wiring, as well as the polysilicon and silicon underneath. The bottom half of the chip is the "datapath", the circuitry that performs calculations on 80-bit floating point values. At the left of the datapath, a constant ROM holds important constants such as Ο. At the right are the eight registers that form the stack, along with the stack control circuitry. The chip's instructions are defined by the large rectangular microcode ROM in the middle.
In 1980, Intel announced the 8087 Math Coprocessor, a chip that made floating-point 100 times faster. I opened up the chip, took photos of the silicon structures, and analyzed its circuitry. It's a very complex chip for its time. Let's take a look inside...
09.12.2025 18:38 β π 124 π 31 π¬ 3 π 2Data science research opportunity open to undergraduate students across all of Canada. Iβve got a proposal in there: βClassifying fish species with soundβ ππ
A few summers ago I worked with a great quantitative ecology student from UBC so itβs very open to students from various backgrounds!
5 dimensions being high-dimensional, with intuitions from 1 and 2 dimensional spaces utterly failing, is a pretty good rule of thumb.
09.12.2025 17:59 β π 22 π 3 π¬ 0 π 0All models are great if you donβt check assumptions.
09.12.2025 17:56 β π 6 π 2 π¬ 0 π 0Had weird dreams last night and the only vivid detail I can remember is referring to a one-man band as "Music Man X", presumably because with all of those instruments the performer looks like a robot.
Upon woken reflection, a one-man band rocking the Storm Eagle theme would be pretty sick.
My thesis analysis was never going to be published, but that's not the fault of the ol' machine. I almost feel nostalgia about the shower maximum detector. Almost. π«‘
09.12.2025 03:13 β π 2 π 0 π¬ 0 π 0Only a few more days to register for my charity regression course on Wednesday. All material, including slides and recordings, will be made available for those who cannot attend live. A few sponsored registrations still available. Registration details at betanalpha.github.io/courses/.
08.12.2025 05:49 β π 1 π 2 π¬ 0 π 0Only a few more days to register for my charity regression course on Wednesday. All material, including slides and recordings, will be made available for those who cannot attend live. A few sponsored registrations still available. Registration details at betanalpha.github.io/courses/.
08.12.2025 05:49 β π 1 π 2 π¬ 0 π 0Admittedly a trans-dimensional MCMC algorithm that could transition between targeting a distribution over a compact set and the push forward along the set boundary to approximate Greenβs theorem would be cool.
04.12.2025 22:42 β π 0 π 0 π¬ 0 π 0I was today years old when I realized that βintegration by dartsβ is a pun in βintegration by partsβ.
04.12.2025 22:40 β π 5 π 0 π¬ 1 π 0