🥖 Stick Breaking Transform

Interactive Visualization: Cube [0,1]² → Simplex (3 weights)

Cube Coordinates

z₁ (First Parameter) 0.50
z₂ (Second Parameter) 0.50
Temperature 1.00

Simplex Weights

w₁
0.333
w₂
0.333
w₃
0.333
Unit Cube [0,1]²

Red dot shows current (z₁, z₂) position

Probability Simplex

Triangle shows valid probability space

How Stick Breaking Works:
θ₁ = sigmoid(z₁/T) = 1/(1 + e^(-z₁/T))
θ₂ = sigmoid(z₂/T) = 1/(1 + e^(-z₂/T))

w₁ = θ₁
w₂ = (1 - θ₁) × θ₂
w₃ = (1 - θ₁) × (1 - θ₂)

Each parameter controls how much of the "remaining stick" gets allocated to the next weight.

Grid Sampling: How Cube Points Map to Simplex

Each colored square represents a point in the cube. Color shows the dominant simplex weight. Click any square to jump to that point!