A training set contains ninety routine cases and ten unusual ones. A classifier can look impressively accurate while missing every unusual case. Class weights offer one way to change what the learning process pays attention to, but the resulting model still needs to work in the population where it will be used.
Follow the weight into the calculation
In scikit-learn’s SGDClassifier, the balanced setting assigns weights inversely related to class frequency. For a two-class, hundred-row example, the class with ninety rows receives a weight of about 0.556; the class with ten receives 5. Each class therefore contributes an aggregate weight of fifty before differences in individual losses are considered.
Those numbers are training weights. They do not mean the rare event now happens half the time outside the dataset. Nor does a weight of five guarantee five times as many correct detections. The fitted boundary depends on the features, the model and its other settings.
Keep a separate evaluation notebook
For a useful comparison, record an unweighted baseline and the weighted candidate on the same held-out cases. Write down actual counts: rare cases found, rare cases missed, and routine cases incorrectly flagged. A single accuracy percentage hides the trade-off the weights were intended to address.
Suppose the weighted candidate finds three additional unusual cases but sends twenty more routine cases for review. Whether that is worthwhile depends on the consequences and the team’s review capacity. This is an illustrative decision question, not a promised result from weighting.
Change one decision at a time
Record the weight setting beside the training data version. Treat a later change to the prediction threshold as a separate experiment so its effect remains visible. Reserve the final test set for evaluation rather than repeatedly using it to choose settings.
The useful deliverable is a comparison someone can act on: what became easier to detect, what extra work appeared, and whether the evaluation cases resemble the intended use. A parameter labelled balanced cannot answer those questions by itself.

