imbalanced multi-label dataset #740
-
hey everyone, '' ValueError: You appear to be using a legacy multi-label data representation. The sequence of sequences are no longer supported; use a binary array or sparse matrix instead - the MultiLabelBinarizer transformer can convert to this format. '' so is there a way to deal with this problem using this library? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
For multi-labeled datasets, I don't what's the best way to handle it. |
Beta Was this translation helpful? Give feedback.
-
Hello, i am trying to use the BCEWithLogitsLossFlat(pos_weight=dls.train.cws) in my dataset(2 classes). I am getting the following error after passing the class weights to the loss function: ValueError: Target size (torch.Size([128])) must be the same as input size (torch.Size([128, 2])) The error code is: Notably, the same error was reported when I tried to reproduce tutorial file '01a_Multi-class classification'. This is a 6-categorization problem. ValueError: Target size (torch.Size([384])) must be the same as input size (torch.Size([2304])) I would appreciate your help in checking what is causing this. Looking forward to your reply. |
Beta Was this translation helpful? Give feedback.
Yes, you can use weights in 2 ways: