Part 4 of 58

The Weights

By Madhav Kaushish · Ages 12+

Trviksha stared at the stick on the stone grid. It worked. Given a patient's age, the stick gave a rough sickness prediction. But what was the stick, really?

Two Numbers

The stick was defined by two things: its angle and where it crossed the left edge of the grid.

The angle determined how much the prediction changed for each year of age. A steep angle meant age mattered a lot — each additional decade pushed the predicted sickness score up sharply. A shallow angle meant age mattered less. The angle was, in effect, the importance of age as a factor.

The crossing point — where the stick met the left edge at age zero — was the baseline prediction. A patient with zero age (a meaningless concept, but mathematically necessary) would receive this score. All other predictions were this baseline plus the angle's contribution.

Blortz: So the stick is two numbers. An angle and a starting point.

Trviksha: Yes. And those two numbers are the entire prediction system. If I write them down — say, angle is 0.06 per year and baseline is 1.2 — then anyone can compute a prediction for any age. Multiply the age by 0.06, add 1.2. That is the prediction.

Blortz: The stick is a formula.

Trviksha: The stick is two pebble arrangements on a shelf. One arrangement encodes 0.06. The other encodes 1.2. Everything the system knows about the relationship between age and sickness is stored in those two arrangements.

This struck her as remarkable. Two hundred and fourteen patient records — thousands of pebbles of data — had been compressed into two numbers. The numbers did not remember any individual patient. They remembered the trend across all patients. They were a summary so compressed that it felt like it should have lost everything, and yet it had kept the one thing that mattered: the pattern.

Adjusting the Numbers

The two numbers were not sacred. Trviksha had found them by moving the stick around until the fit looked good, then by measuring total squared error. But she wanted a more systematic approach — one a velociraptor could follow without judgment.

Blortz: Start with any two numbers. Compute predictions for all patients. Measure how wrong the predictions are. Then adjust the numbers slightly in the direction that makes the predictions less wrong. Repeat.

Trviksha: How do I know which direction is "less wrong"?

Blortz: If the predictions are generally too low — the stick is below the pebbles — then raise the baseline. If the predictions rise too slowly with age — the stick is too flat — then steepen the angle. Each adjustment should be small. You are nudging, not jumping.

Trviksha formalised the process:

Step 1: Compute the prediction for each patient (age times angle, plus baseline). Step 2: For each patient, compute the error — the difference between the prediction and the actual sickness score. Step 3: If the errors tend to be positive (predictions too high), decrease the baseline slightly. If negative, increase it. Step 4: If the errors tend to be larger for older patients (the stick is too flat), increase the angle slightly. If the errors are larger for younger patients (the stick is too steep), decrease the angle. Step 5: Repeat from Step 1.

She assigned a velociraptor to follow this procedure. After one pass through all the patients, the squared errors had decreased. After a second pass, further. After ten passes, the numbers had settled: angle 0.058, baseline 1.35. Moving either number in any direction made the total error worse. The velociraptor had found the best fit — the same position Trviksha had found by eye, but now arrived at mechanically, without judgment.

A stone table showing two pebble arrangements labelled "angle" and "baseline." Arrows show each being nudged up or down based on error measurements. A velociraptor adjusts one arrangement while consulting a tablet of patient outcomes

The Model

Glagalbagal: What do you call this?

Trviksha: I am not sure. It is a prediction system. Its knowledge is stored as numbers — the angle and the baseline. The numbers were not chosen by me. They were found by a mechanical process that adjusted them until the predictions were as good as they could be.

Glagalbagal: A system that learns its own rules?

Trviksha: A system that finds its own numbers. The rules are mine — "multiply age by the angle, add the baseline." The numbers are discovered from data.

Blortz: The numbers are weights. The angle is the weight of age — how much age contributes to the prediction. The baseline is the weight of... existing.

Trviksha: The weight of showing up. Every patient starts with a baseline risk, and age adds to it, weighted by how much age matters.

Blortz's terminology stuck. The numbers were weights. The prediction was a weighted combination of inputs. And the complete set of weights — the angle and the baseline, stored as pebble arrangements — was the model.

The model was not a set of rules. It was not a description of how disease worked. It was a set of weights that, when applied to a patient's age, produced a number. The number was useful for prediction. The weights had been found by a mechanical process. Trviksha had built a system that learned — not in the way a healer learns, through understanding and experience, but in a narrower, more alien way: by adjusting numbers until the errors got small.

Glagalbagal: In my day—

Trviksha: I know. Pebbles counted sheep. Now pebble arrangements are the knowledge itself. The weights are what the system knows. Change the weights, and you change what it knows.