Lab

The math in use

Every formula outside the Exploring notes is implemented somewhere on this platform. Some draw a Lab visualization, some check whether a forecast earned its confidence, and a couple keep a marathon training plan from ramping too fast. Each entry opens with what the formula is for in plain English, then shows the textbook form and where it lives. You can skip the notation and still follow along.

Information Theory

How evenly or how lopsidedly something is spread, boiled down to one number.

Shannon entropy (normalized)

Measures how evenly a total is spread across its buckets, from everything in one bucket to a perfectly even split. Here it tells me when one project has crowded the rest out of the backlog.

H=−∑ipilog⁡2pi,H^=Hlog⁡2NH = -\sum_{i} p_{i} \log_{2} p_{i}, \qquad \hat{H} = \frac{H}{\log_{2} N}
  • Backlog health tooling caskeycoding-specs _shared/tooling/backlog.py (health: epic distribution)

Exploring

Formulas I have a use for but have not built yet.

Entropy-weighted digest diversity

Ranks a candidate higher when adding it would spread the digest across more sections, the way a good playlist avoids playing one album straight through.

H^=−∑spslog⁡ps,scorei∝ui⋅H^S∪{i}\hat{H} = -\sum_{s} p_{s} \log p_{s}, \qquad \text{score}_{i} \propto u_{i} \cdot \hat{H}_{S \cup \{i\}}

Opportunity: Score the diversity of digest sections the way backlog health already scores how concentrated the work is.

Probability & Statistics

Telling skill from luck, and working out how much a number deserves to be trusted.

Isotonic regression (pool-adjacent-violators)

Fits the best staircase that is only allowed to climb, never step down. A sensible grading curve follows the same rule: a higher raw score should never earn a lower grade.

f^=arg⁡min⁡g nondecreasing∑iwi(yi−g(xi))2\hat{f} = \arg\min_{g \text{ nondecreasing}} \sum_{i} w_{i} \left( y_{i} - g(x_{i}) \right)^{2}
  • Calibration engine ai-blog-api src/finance/engine/calibration.py

Brier score + Murphy decomposition

Grades probability forecasts the way you would grade a weather forecaster. Did it rain about as often as they said it would, and did they tell you more than the seasonal average already does? What is left over is noise no forecaster could remove.

BS=1N∑i(pi−oi)2=REL−RES+UNC,UNC=oˉ(1−oˉ)BS = \frac{1}{N} \sum_{i} \left( p_{i} - o_{i} \right)^{2} = REL - RES + UNC, \qquad UNC = \bar{o} \left( 1 - \bar{o} \right)
  • Forecast honesty scoring ai-blog-api src/finance/engine/calibration.py

Deflated Sharpe Ratio

Marks a strategy’s risk-adjusted return down for every other strategy that was tried along the way. Flip enough coins and one will land heads ten times in a row, which says nothing about that coin.

DSR=Φ(SR−E[max⁡kSRk]σSR)DSR = \Phi \left( \frac{SR - E \left[ \max_{k} SR_{k} \right]}{\sigma_{SR}} \right)
  • Calibration engine + backtest stats ai-blog-api src/finance/engine/calibration.py + src/finance/backtest/stats.py

Probabilistic Sharpe Ratio + Minimum Track Record Length

Says how confident you can be that a track record beats its benchmark on skill instead of luck, and how long the record has to run to earn that confidence. One good month proves little. This says how many it takes.

PSR=Φ((SR−SR∗)n−11−γ3SR+γ4−14SR2),MinTRL=1+(ZαSR−SR∗)2(1−γ3SR+γ4−14SR2)PSR = \Phi \left( \frac{(SR - SR^{*}) \sqrt{n - 1}}{\sqrt{1 - \gamma_{3} SR + \frac{\gamma_{4} - 1}{4} SR^{2}}} \right), \qquad MinTRL = 1 + \left( \frac{Z_{\alpha}}{SR - SR^{*}} \right)^{2} \left( 1 - \gamma_{3} SR + \frac{\gamma_{4} - 1}{4} SR^{2} \right)
  • Backtest statistics ai-blog-api src/finance/backtest/stats.py

Probability of Backtest Overfitting (CSCV)

Splits history many different ways and counts how often the best performer in one part of the data finishes below the middle of the pack in the rest. A strategy that only wins on the data it was tuned on is a student who memorized the practice exam.

PBO=1S∑s1{ωs<0},ωs=log⁡(rs1−rs)PBO = \frac{1}{S} \sum_{s} \mathbb{1} \left\{ \omega_{s} < 0 \right\}, \qquad \omega_{s} = \log \left( \frac{r_{s}}{1 - r_{s}} \right)
  • Backtest overfitting check ai-blog-api src/finance/backtest/pbo.py

Harvey-Liu-Zhu multiple-testing hurdle

Raises the bar a result must clear for every other idea that was tested before it. Buy enough lottery tickets and a win stops being evidence of a system.

E[max⁡t]=(1−γ)Φ−1(1−1M)+γ Φ−1(1−1Me)E \left[ \max t \right] = \left( 1 - \gamma \right) \Phi^{-1} \left( 1 - \frac{1}{M} \right) + \gamma \, \Phi^{-1} \left( 1 - \frac{1}{M e} \right)
  • Calibration engine ai-blog-api src/finance/engine/calibration.py

Spearman rank information coefficient

Compares the order a signal ranked stocks in with the order they actually finished. Think of scoring a preseason ranking against the final standings, where only the order counts and the margins do not.

IC=corr(rank(x),rank(y))IC = \text{corr} \left( \text{rank}(x), \text{rank}(y) \right)
  • Factor Monitor
  • Signal validation ai-blog-api src/finance/analysis/signal_validation.py

Stationary block bootstrap (Politis-Romano)

Builds alternate histories by reshuffling a time series in chunks of random length, so streaks and slumps survive the shuffle. Shuffling one day at a time would erase them.

P(L=k)=(1−p)k−1pP \left( L = k \right) = \left( 1 - p \right)^{k - 1} p
  • Factor weighting ai-blog-api src/finance/analysis/scoring/weights_v2.py

Bootstrap percentile confidence bands

Reruns an estimate on many reshuffled copies of the data and reports the range most of the answers fall in. That range is the shaded band you see around a line on a chart.

CIα=[θ^(α/2)∗,  θ^(1−α/2)∗]CI_{\alpha} = \left[ \hat{\theta}^{*}_{(\alpha / 2)}, \; \hat{\theta}^{*}_{(1 - \alpha / 2)} \right]

Winsorization, z-score, MAD, rank-normalization

Four ways to put very different measurements on one scale so they can be compared, without letting one extreme value run the show. Grading on a curve does the same job, with a cap so a single freak score cannot wreck it.

x′=min⁡(max⁡(x,qα),q1−α),z=x−μσ,zMAD=x−medMAD,x↦rank(x)−1/2nx' = \min \left( \max \left( x, q_{\alpha} \right), q_{1 - \alpha} \right), \qquad z = \frac{x - \mu}{\sigma}, \qquad z_{MAD} = \frac{x - \text{med}}{MAD}, \qquad x \mapsto \frac{\text{rank}(x) - 1/2}{n}
  • Seismograph
  • Signal normalization ai-blog-api src/finance/analysis/signals_normalize.py + src/finance/analysis/scoring/pipeline_v2.py

Cross-sectional dispersion (population std dev)

Measures how spread out a group of stocks’ returns are on the same day. Low means the market moved as a herd. High means stocks went their own ways.

σxs=1N∑i(ri−rˉ)2\sigma_{xs} = \sqrt{ \frac{1}{N} \sum_{i} \left( r_{i} - \bar{r} \right)^{2} }

Exploring

Formulas I have a use for but have not built yet.

Embedding cosine similarity for semantic recall

Finds notes that mean what the query means even when they share no words with it, so a search for “car trouble” can turn up a note about a dead battery.

sim(q,d)=q⋅d∥q∥ ∥d∥\text{sim}(q, d) = \frac{q \cdot d}{\lVert q \rVert \, \lVert d \rVert}

Opportunity: Search today is BM25 keyword matching only. Semantic lookup over embeddings would catch the notes that use different words.

Stochastic Processes

Randomness that unfolds over time, which is how options get priced and price paths get simulated.

Black-Scholes price + Greeks

Prices a stock option from five inputs: the stock price, the strike, the time left, interest rates, and how jumpy the stock is. The Greeks are the sensitivities, how much the option price moves when each input does.

C=S0N(d1)−Ke−rTN(d2),d1=ln⁡(S0/K)+(r+σ2/2)TσT,d2=d1−σTC = S_{0} N(d_{1}) - K e^{-rT} N(d_{2}), \qquad d_{1} = \frac{\ln(S_{0} / K) + \left( r + \sigma^{2} / 2 \right) T}{\sigma \sqrt{T}}, \qquad d_{2} = d_{1} - \sigma \sqrt{T}

Implied volatility (bracketed root-find)

Works backward from an option’s market price to the jumpiness the market must be assuming. No formula runs in that direction, so it guesses, checks, and narrows the range until the price matches.

σ^=arg⁡min⁡σ∈[σlo,σhi]∣CBS(σ)−Cmkt∣\hat{\sigma} = \arg\min_{\sigma \in [\sigma_{lo}, \sigma_{hi}]} \left\lvert C_{BS}(\sigma) - C_{mkt} \right\rvert
  • Implied-volatility surface ai-blog-web src/quant-viz/compute/impliedVol.ts

Geometric Brownian motion Monte Carlo

Simulates thousands of possible futures for a price, one random step at a time. Any single path is only a story. The spread across all of them shows the range of outcomes to expect.

St+1=Stexp⁡((μ−σ22)Δt+σΔt Z),Z∼N(0,1)S_{t + 1} = S_{t} \exp \left( \left( \mu - \frac{\sigma^{2}}{2} \right) \Delta t + \sigma \sqrt{\Delta t} \, Z \right), \qquad Z \sim N(0, 1)

Realized volatility cone

Shows how volatile a market has usually been over short and long windows, drawn as a cone of typical ranges. Put today’s reading on the cone and you can see whether this much calm, or this much chaos, is unusual.

σh=1n∑i=1nri2horizon h,Pq(h)=quantileq(σh)\sigma_{h} = \sqrt{ \frac{1}{n} \sum_{i = 1}^{n} r_{i}^{2} }_{\text{horizon } h}, \qquad P_{q}(h) = \text{quantile}_{q} \left( \sigma_{h} \right)

Variance risk premium

Compares the turbulence option buyers paid to be protected from with the turbulence that actually arrived. Think of the gap between an insurance premium and the claims that came in.

VRP=σIV−σRVVRP = \sigma_{IV} - \sigma_{RV}

Newton-Raphson implied vol with analytic vega

Finds implied volatility by following the slope of the price curve toward the answer. Knowing the slope exactly, it gets there in fewer steps than halving a range. If the slope goes flat or a step overshoots, it switches to halving for the rest of the way.

σk+1=σk−C(σk)−Cmktν(σk)\sigma_{k + 1} = \sigma_{k} - \frac{C(\sigma_{k}) - C_{mkt}}{\nu(\sigma_{k})}
  • Implied-volatility surface ai-blog-web src/quant-viz/compute/impliedVol.ts

Time Series & Regimes

Reading a history for what is normal, what just changed, and how much the recent past should count.

EWMA + standardized regime shift

Keeps a running average that weights recent days most, then asks how unusual today is against it. The same reading can be ordinary in a stormy month and alarming in a calm one.

μ^t=λμ^t−1+(1−λ)xt,zt=xt−μ^tσ^t\hat{\mu}_{t} = \lambda \hat{\mu}_{t - 1} + \left( 1 - \lambda \right) x_{t}, \qquad z_{t} = \frac{x_{t} - \hat{\mu}_{t}}{\hat{\sigma}_{t}}
  • Regime shift detection ai-blog-api src/finance/regime/shift.py

Absorption ratio (eigenvalue variance share)

Measures how much of a market’s movement comes from just a few shared forces. When that share climbs, stocks are moving as one crowd and diversification buys less.

AR=∑i=1nλi∑j=1NλjAR = \frac{\sum_{i = 1}^{n} \lambda_{i}}{\sum_{j = 1}^{N} \lambda_{j}}
  • Regime absorption ai-blog-api src/finance/regime/absorption.py

Nelson-Siegel yield curve

Draws a smooth curve through interest rates of every maturity using just a level, a slope, and a hump. Three numbers stand in for the whole curve, which makes one day easy to compare with another.

y(τ)=β0+β11−e−τ/λτ/λ+β2(1−e−τ/λτ/λ−e−τ/λ)y(\tau) = \beta_{0} + \beta_{1} \frac{1 - e^{-\tau / \lambda}}{\tau / \lambda} + \beta_{2} \left( \frac{1 - e^{-\tau / \lambda}}{\tau / \lambda} - e^{-\tau / \lambda} \right)

CPI year-over-year from index levels

Turns a monthly price index into the inflation number in the headlines by comparing each month with the same month a year earlier.

YoYt=CPItCPIt−12−1YoY_{t} = \frac{CPI_{t}}{CPI_{t - 12}} - 1
  • Macro Phase
  • Backend twin ai-blog-web src/quant-viz/compute/macroPhase.ts + ai-blog-api macro exporter (lockstep pair)

Percent above trailing mean (breadth)

Counts what share of stocks are trading above their own recent average. An index can rise on a handful of giants. This shows whether the rest of the market came along.

Bt=1N∑i1{pi,t>pˉi}B_{t} = \frac{1}{N} \sum_{i} \mathbb{1} \left\{ p_{i, t} > \bar{p}_{i} \right\}

Simplified TRIMP training load

Scores a workout by multiplying how long it lasted by how hard it was. An easy hour and a hard half hour can land on the same number, which is what lets very different runs be added into one weekly total.

TRIMP=duration×intensityTRIMP = \text{duration} \times \text{intensity}
  • Coach metrics engine ai-blog-api src/coach/metrics/engine.py

Acute:chronic workload ratio (ACWR)

Compares this week’s training load with the average of recent weeks to flag doing too much too soon. It is the number behind the old advice to build mileage gradually.

ACWR=acute loadchronic loadACWR = \frac{\text{acute load}}{\text{chronic load}}
  • Coach metrics engine ai-blog-api src/coach/metrics/engine.py

Exponential half-life decay

Weights recent items more than old ones, halving the weight every fixed number of days. Older items fade instead of dropping off a cliff.

w(d)=2−d/hw(d) = 2^{-d / h}
  • Digest ranking

Exploring

Formulas I have a use for but have not built yet.

Banister impulse-response (CTL/ATL/TSB)

Treats every workout as a deposit into two accounts: fitness, which builds and fades slowly, and fatigue, which builds and fades fast. Race readiness is the first minus the second, which is why a taper works.

CTLt=λfCTLt−1+(1−λf)Lt,ATLt=λgATLt−1+(1−λg)Lt,TSBt=CTLt−ATLtCTL_{t} = \lambda_{f} CTL_{t - 1} + \left( 1 - \lambda_{f} \right) L_{t}, \qquad ATL_{t} = \lambda_{g} ATL_{t - 1} + \left( 1 - \lambda_{g} \right) L_{t}, \qquad TSB_{t} = CTL_{t} - ATL_{t}

Opportunity: The coach tracks training load and ramp rate today. Modeling fitness and fatigue separately is the next step up.

Riegel race-time prediction

Predicts a race time at one distance from a known time at another. It builds in the slowdown every runner feels: double the distance and the time more than doubles.

T2=T1(D2D1)αT_{2} = T_{1} \left( \frac{D_{2}}{D_{1}} \right)^{\alpha}

Opportunity: The coach measures training load but does not yet predict a finish time.

Linear Algebra & Geometry

Treating many measurements at once as points and directions, so patterns show up as shapes.

PCA via cyclic Jacobi eigendecomposition

Finds the few directions along which a dataset varies the most, so many stocks can be placed on a map you can actually look at. It gets there by rotating the correlations a little at a time until the pattern lines up with the axes.

A→RTAR,tan⁡2θ=2aijaii−ajjA \rightarrow R^{T} A R, \qquad \tan 2\theta = \frac{2 a_{ij}}{a_{ii} - a_{jj}}

Cosine similarity + mutual top-K graph + force layout

Links each stock to the few it behaves most like, then lets those links pull like springs while everything else pushes apart. Similar stocks settle into neighborhoods without anyone drawing the borders.

sij=xi⋅xj∥xi∥ ∥xj∥,Fi=∑j∈N(i)ks(dij−ℓ)u^ij−∑j≠ikrdij2u^ijs_{ij} = \frac{x_{i} \cdot x_{j}}{\lVert x_{i} \rVert \, \lVert x_{j} \rVert}, \qquad F_{i} = \sum_{j \in N(i)} k_{s} \left( d_{ij} - \ell \right) \hat{u}_{ij} - \sum_{j \neq i} \frac{k_{r}}{d_{ij}^{2}} \hat{u}_{ij}

Linear dynamical system + trace/determinant stability + RK4

Classifies whether a simple two-variable system settles back to rest or spirals away after a push, then traces the path it takes. Picture a marble in a bowl versus a marble balanced on top of one.

x˙=Ax,stable  ⟺  tr(A)<0,  det⁡(A)>0,xt+1=xt+h6(k1+2k2+2k3+k4)\dot{x} = A x, \qquad \text{stable} \iff \text{tr}(A) < 0, \; \det(A) > 0, \qquad x_{t + 1} = x_{t} + \frac{h}{6} \left( k_{1} + 2 k_{2} + 2 k_{3} + k_{4} \right)
  • Vector-field streamlines ai-blog-web src/quant-viz/compute/vectorField.ts

OLS residualization / factor orthogonalization

Removes the part of a signal already explained by known factors, keeping only what is new. If a new signal is mostly an old one under a different name, this is where it shows.

β^=(XTX)−1XTy,r=y−Xβ^\hat{\beta} = \left( X^{T} X \right)^{-1} X^{T} y, \qquad r = y - X \hat{\beta}
  • Scoring pipeline ai-blog-api src/finance/analysis/scoring/pipeline_v2.py

Euclidean projection onto the probability simplex

Nudges a set of portfolio weights as little as possible until none are negative and together they add up to the whole. It turns a rough wish list into an allocation you could actually hold.

w^=arg⁡min⁡w∈Δ∥w−v∥22,Δ={w:wi≥0,  ∑iwi=1}\hat{w} = \arg\min_{w \in \Delta} \lVert w - v \rVert_{2}^{2}, \qquad \Delta = \left\{ w : w_{i} \geq 0, \; \sum_{i} w_{i} = 1 \right\}
  • Portfolio benchmarks ai-blog-api src/finance/backtest/benchmarks.py

One-common-factor PSD correlation model

Describes how many assets move together using one shared force and each asset’s sensitivity to it, which keeps the correlations consistent with each other. Turn the force up and everything moves as one, which is what a panic looks like.

ρij=βiβj,∣βi∣≤1  ⟹  Σ⪰0\rho_{ij} = \beta_{i} \beta_{j}, \qquad \lvert \beta_{i} \rvert \leq 1 \implies \Sigma \succeq 0

Optimization & Learning

Choosing well under a limit: how much to bet, what to keep, what to rank first.

Exponentiated-gradient multiplicative weights (Helmbold)

Rebalances each period by giving a little more weight to what just did well and a little less to what did not. It is simple enough to serve as a benchmark that a smarter strategy has to beat.

wt+1,i=wt,ieηz^t,i∑jwt,jeηz^t,jw_{t + 1, i} = \frac{w_{t, i} e^{\eta \hat{z}_{t, i}}}{\sum_{j} w_{t, j} e^{\eta \hat{z}_{t, j}}}
  • Portfolio benchmarks ai-blog-api src/finance/backtest/benchmarks.py

OLMAR + best constant-rebalanced portfolio

Leans into whatever has dropped below its recent average, betting on a snap back. The yardstick beside it is the best fixed mix you could have picked with perfect hindsight, which no real strategy gets to know in advance.

x^t+1=xˉt+ϵmax⁡(0,xˉt−xt),w∗=arg⁡max⁡w∈Δ∏t(w⋅rt)\hat{x}_{t + 1} = \bar{x}_{t} + \epsilon \max \left( 0, \bar{x}_{t} - x_{t} \right), \qquad w^{*} = \arg\max_{w \in \Delta} \prod_{t} \left( w \cdot r_{t} \right)
  • Portfolio benchmarks ai-blog-api src/finance/backtest/benchmarks.py

Kelly criterion

Sizes a bet from how often you win and how much a win pays. Bet less than this and you leave growth on the table. Bet more and even a real edge can ruin you.

f∗=p−1−pbf^{*} = p - \frac{1 - p}{b}
  • Position sizing ai-blog-api src/finance/engine/sizing.py

Volatility targeting + drawdown throttle

Scales exposure down when risk runs hot and eases off further after losses pile up. A careful driver does the same: slower in the rain, slower still after a skid.

wt=σ∗σ^t,wt↦wt⋅g(DDt)w_{t} = \frac{\sigma^{*}}{\hat{\sigma}_{t}}, \qquad w_{t} \mapsto w_{t} \cdot g \left( DD_{t} \right)
  • Position sizing ai-blog-api src/finance/engine/sizing.py

ICIR factor weighting with James-Stein shrinkage

Weights each signal by how consistently it has predicted returns, then shrinks every weight toward zero so a short lucky streak is not mistaken for a track record. One great week does not make a rookie a veteran.

wi∝ICiσICi,θ^=(1−(k−2)σ2∥xˉ∥2)+xˉw_{i} \propto \frac{IC_{i}}{\sigma_{IC_{i}}}, \qquad \hat{\theta} = \left( 1 - \frac{(k - 2) \sigma^{2}}{\lVert \bar{x} \rVert^{2}} \right)^{+} \bar{x}
  • Factor weighting ai-blog-api src/finance/analysis/scoring/weights_v2.py

BM25 relevance ranking

Ranks documents by how well their words match a search. A hit on a rare word counts for more than a hit on a common one, and a long document does not win just for having more words.

score(D,q)=∑iIDF(qi) f(qi,D)(k1+1)f(qi,D)+k1(1−b+b∣D∣avgdl)\text{score}(D, q) = \sum_{i} IDF(q_{i}) \, \frac{f(q_{i}, D) \left( k_{1} + 1 \right)}{f(q_{i}, D) + k_{1} \left( 1 - b + b \frac{\lvert D \rvert}{avgdl} \right)}
  • Document search

Budgeted greedy selection under byte cost

Fills a fixed amount of space by repeatedly taking whichever item offers the most value for the room it takes up. Packing a carry-on works the same way: the bulky sweater has to earn its place.

max⁡S∑i∈Suis.t.∑i∈Sci≤B,pick by ui/ci\max_{S} \sum_{i \in S} u_{i} \quad \text{s.t.} \sum_{i \in S} c_{i} \leq B, \qquad \text{pick by } u_{i} / c_{i}
  • Digest packing

Grade banding with hysteresis

Changes a grade only when the score moves clearly past the line, so a score hovering at the border does not flip back and forth. A thermostat works the same way, waiting for a real change before it switches.

gt={upgradest>θuholdθd≤st≤θudowngradest<θdg_{t} = \begin{cases} \text{upgrade} & s_{t} > \theta_{u} \\ \text{hold} & \theta_{d} \leq s_{t} \leq \theta_{u} \\ \text{downgrade} & s_{t} < \theta_{d} \end{cases}
  • Composite grading ai-blog-api src/finance/analysis/scoring/composite.py

Numerical Methods

The plumbing that makes the rest computable and repeatable.

Acklam inverse normal CDF approximation

Turns a probability back into a distance from average, such as how far out a one-in-a-hundred day sits. It replaces a lookup people used to do from a printed table.

Φ−1(p)≈∑kaktk1+∑kbktk,t=−2ln⁡p(central region)\Phi^{-1}(p) \approx \frac{\sum_{k} a_{k} t^{k}}{1 + \sum_{k} b_{k} t^{k}}, \qquad t = \sqrt{-2 \ln p} \quad \text{(central region)}
  • Calibration engine ai-blog-api src/finance/engine/calibration.py

Piecewise linear interpolation

Estimates values between known points by connecting them with straight lines. If you know the rate at two years and at five, this gives the reasonable guess for three.

f(x)=yi+x−xixi+1−xi(yi+1−yi),x∈[xi,xi+1]f(x) = y_{i} + \frac{x - x_{i}}{x_{i + 1} - x_{i}} \left( y_{i + 1} - y_{i} \right), \qquad x \in [x_{i}, x_{i + 1}]
  • Today
  • Interpolation utilities ai-blog-api src/finance/utils/interpolation.py

Equal-width histogram binning

Sorts values into equal-width buckets to draw the shape of a distribution, the same way you might sort a class’s test scores into ten-point ranges to see where most people landed.

b(x)=min⁡(⌊x−xmin⁡w⌋,  K−1),w=xmax⁡−xmin⁡Kb(x) = \min \left( \left\lfloor \frac{x - x_{\min}}{w} \right\rfloor, \; K - 1 \right), \qquad w = \frac{x_{\max} - x_{\min}}{K}

Seeded PRNG discipline (mulberry32, hash jitter)

Makes every random-looking picture come out the same on every visit by starting the randomness from a fixed seed. If a chart looks odd, I can reproduce exactly what you saw.

seed↦{un},un∈[0,1)seed \mapsto \left\{ u_{n} \right\}, \qquad u_{n} \in [0, 1)
  • All stochastic visualizations ai-blog-web src/quant-viz/compute (all stochastic paths)