How do I assign different weights to training samples?
Why assign different weights to training samples?
In some use cases, you may want to assign different levels of importance to samples in the training table. For example, on an e-commerce platform, you might emphasize high-value customers more during training by assigning them larger weights.
Kumo supports sample-level weighting through the training table. Using the kumo-sdk, you can add a weight column to scale each row’s relative contribution to the loss function.
Guidelines for setting weights
- Zero weights: Setting a weight of zero removes that sample from training, which is useful for excluding noisy or irrelevant instances. Assigning zero weights to too many samples reduces the effective loss signal and can slow convergence.
- Highly skewed weights: Extreme disparities between sample weights can harm training stability, slow convergence, and reduce generalization. If you use skewed weight distributions, monitor the training loss curve closely.
- Negative weights: Kumo does not support negative weights for most training tasks. They are only allowed for temporal link prediction tasks.
Use instance weighting to align training with business value, but evaluate the effects on loss stability and model performance before deploying.