How to Prevent Overfitting

You have to provide the weight for each sample.
Have a look at this small example.
Basically you are assigning the weights to each sample by using the target as an index.

1 Like