Gradient House

One real training step, opened up.

Linear regression 3 features · 4 parameters

Manual SGD · ready

Choose a training example

Start with one row. We will follow its values through prediction, error, gradients, and an update.

Waiting for a house
ŷ = wsizexsize + wbedsxbeds + wagexage + b ŷ is measured in $100K

Pick a row on the left

Any cell selects the entire house. Its three features will move forward; its known price waits for the loss step.

Model inputs
Square feet — waiting for a row
Bedrooms — waiting for a row
Age — waiting for a row
Weighted evidence
Size × wsize — not calculated
Beds × wbeds — not calculated
Age × wage — not calculated
Combine + bias
Linear sum — three terms + b
Prediction
Predicted price — ŷ × $100K

What happens here

Select a house to load its three features.

The price label is visible in the dataset, but the model cannot use it to make its prediction.

Prediction —
Ground truth waiting
Loss · ½e² waiting

    Training trace

    Parameter history

    1 snapshot
    Parameter values after initialization and each completed training update
    Update Training point wₛ · size wᵦ · beds wₐ · age b · bias

    Initialization is the first row. Every completed backward pass appends another point in time.

    Before the model

    Normalization & fixed scaling

    Scaling changes a number’s units and magnitude without changing what it represents. Keeping the inputs on similar numeric scales makes gradient updates better behaved and lets one learning rate work across all three weights.

    Precision noteThis demo uses fixed divisors rather than min–max or z-score normalization. Features land roughly between 0 and 1; the label is expressed in $100K units and is not forced into that range.

    Scaling rules for model features and the price label
    Quantity Raw values here Forward scaling Model values here Return to original units
    Square feetfeature · xsize 950–3,100 ft² xsize = ft² ÷ 3,200 0.297–0.969 ft² = xsize × 3,200
    Bedroomsfeature · xbeds 2–5 bedrooms xbeds = beds ÷ 5 0.400–1.000 beds = xbeds × 5
    Agefeature · xage 2–35 years xage = years ÷ 50 0.040–0.700 years = xage × 50
    Sale pricelabel · y $240K–$750K y = price ($K) ÷ 100 2.400–7.500 price = ŷ × $100K
    Comparable gradients

    Square feet no longer produces a huge gradient merely because its raw unit is numerically larger than bedrooms or age.

    One consistent transform

    The constants are fixed for the run and applied identically to every training example and every later prediction.

    Readable output

    The model learns in $100K units, then the inverse scaling converts ŷ back to the dollar values shown throughout the Gym.

    Synthetic teaching data. This tiny linear model demonstrates training mechanics; it is not a property appraisal tool.