ML Playground

The math behind
the system.

These are the actual mathematical models Iron Logic uses. Drag the sliders to see how changing inputs shifts the output — live, in your browser.

Linear Regression — OLS
Ordinary Least Squares · Fits ŷ = β₀ + β₁x
ŷ = β₀ + β₁x  ·  β = (XᵀX)⁻¹Xᵀy
Noise level σ 12
Sample size n 20
True slope β₁ 3.0
MSE
β₁ (fitted)
Each point is a simulated lead. x = response time rank, y = conversion probability. The red line is what OLS learns — Iron Logic uses this to project per-business conversion lift.
Gradient Descent
Minimizing L(θ) = (1/n)Σ(y − θx)² iteratively
θ ← θ − α · ∂L/∂θ
Learning rate α 0.05
Start θ -6.0
Iterations
Final loss
θ* converged
The ball rolls down the loss curve toward the minimum. Too high a learning rate → overshooting. Too low → slow convergence. This is how LLM fine-tuning updates model weights.
Bayesian Intent Classification
P(intent | message) — how the AI routes each incoming message
P(y|x) = P(x|y) · P(y) / P(x)  ·  argmax P(y|x)
Prior: Booking %
35%
Prior: Price %
28%
Prior: FAQ %
22%
Prior: Complaint %
15%
Adjust the prior probabilities (based on historical message data) and watch the posterior distribution shift. The AI routes to the highest-probability intent — this determines which response template fires and whether a booking flow is triggered.
Mini LLM — LaMini-Flan-T5 (runs in your browser)
Instruction-tuned transformer · 248M parameters · WebAssembly inference · no server
Transformer attention · BPE tokenisation · autoregressive generation · temperature sampling
Model not loaded · ~82 MB download · cached after first load
Temperature 0.80
Max new tokens 60
Prompt
Generated output
Load the model first, then generate.
248M
Parameters
32k
SentencePiece vocab
Enc-Dec
Architecture
~100MB
Quantized size
LaMini-Flan-T5 is an instruction-tuned T5 model fine-tuned on 2.58M instruction-response pairs. Unlike raw GPT-style models, it actually follows prompts — ask it a question and it answers. Runs entirely in your browser via WebAssembly. Downloads from Hugging Face on first load (~100MB) and is cached — subsequent loads are instant.