Manual SGD · ready
Choose a training example
Start with one row. We will follow its values through prediction, error, gradients, and an update.
ŷ = 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.
What happens here
The price label is visible in the dataset, but the model cannot use it to make its prediction.
Training trace
Parameter history
| 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.
| 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 |
Square feet no longer produces a huge gradient merely because its raw unit is numerically larger than bedrooms or age.
The constants are fixed for the run and applied identically to every training example and every later prediction.
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.