0
votes

I am using class weights for multiclass classification using sklearn's compute_weight function and pytorch for training the model. For to compute the class weight, whether we need to use all data (training, validation and test) or only training set data for calculating the class weights. Thanks

1

1 Answers

0
votes

When training your model you can only assume training data is available for you. Estimating the class_weights is part of the training -- it defines your loss function.