For context: I'm training a classification neural network and considering what options…
- User
For context: I'm training a classification neural network and considering what options to try to deal with the class imbalance in the dataset. What do you think about the following ideas and suggestions: Ideas
-
- More data
- With the current classification classes in requirements (H, Fw, A, Unknown) we need airliners the most.
- Could collect more airliner data e.g. near an airport with @tt s camera-on-stick idea (one (usual annotations) or two (experiment with getting gt distance from stereo) cameras). (Is there a task for it?)
- Could probably even get data with desired pixel-size by choosing distance to airport accordingly.
- My intuition is that background and weather would still be similarly diverse as in current data and if we take videos from different positions also the orientation should be diverse.
- Can be combined with other ideas
-
- Upsampling, is also the idea in T9658
- Pobably most common method
- Also done by @mathias [[ https://git-ng.daedalean.ai/daedalean/exp-spotter/src/commit/534eea23086233f41d89add2b19b6510ca147b28/distsclasses/models/train_cnn.py#L413 | with pytorch's WeightedRandomSampler ]] (Any results on this?)
- Should improve/change samplers for this as suggested in T9658.
- But as mentioned by @ccc it can also already be done in TP, manually computing (based on datastats) and setting the weight of each class there. (How to do it exactly, we select the same datagroup multiple times, each time setting a different filter and different weight? Do we already have tried this in the past and have an example of it?)
-
- Give more weight in the loss to samples from rare classes
- In theory almost equivalent to 2.
- Could be adapted without changing TP (I consider it separate from sampling), e.g. when we want to give more weight to
Unknownbecause it's less bad when the model wrongly predictsUnknown - As I understand training duration would not increase compared to 2 (assuming we keep number of epochs for majority class the same).
-
- Sim or ROA
- Did not manage to improve distance performance much so far, so probably for classification also would not be easy to make work
- For the idea of "Fixing class imbalance with sim/roa data for the minority class" I can not find an example in literature where this has been done successfully, so I would guess this generally does not work well
-
Assistant
I think you are right, do 1, 2 and 3.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.