What does passing sample_weight to fit() actually do?
Correct answer
A. It multiplies each row's contribution to the loss by its weight, without resampling the data
14 views
A. It multiplies each row's contribution to the loss by its weight, without resampling the data
14 views
Sample weights enter the objective as multipliers on per-row losses, so a weight of 2 counts a sample like two identical copies while the dataset size stays unchanged. They are the mechanism behind class_weight='balanced' and behind survey or exposure weighting. Weights change the learned coefficients or split thresholds, not the behaviour of predict.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is A? Ask here and get an explanation.