3

Suppose we have a game and its action space contains two possible actions: A and B.

We have a labelled dataset of state-action pairs but 95% of actions are A and only 5% are B

If we train a neural network, it will always output A as it will choose the most probable class to decrease its loss.

Are there ways to solve this problem?

Valentin Calomme
  • 6,026
  • 3
  • 21
  • 52
amin msh
  • 171
  • 2
  • 7
  • 3
  • Are you using reinforcement learning or are you training a classifier? 2) You claim the network will always output A. Do you have any evidence that it is happening or are you speculating? Indeed, when you deal with class imbalance, it is likely that the majority class will be chosen more often, but the minority class definitely has a chance to be predicted as well.
  • – Valentin Calomme May 07 '20 at 11:43
  • 1
    One approach would be to "oversample" the minority class, e.g. for each sample from A that is shown to the network, 10 samples from Bare shown. – Peter May 07 '20 at 12:07
  • @ValentinCalomme For a classifier we can split our data and make a balance between two classes but if we have RL problem it is harder to split the data. suppose we have a continuous q-table and we can't manipulate it. can we use a custom loss function that it is more sensitive to B or using different network architecture. I trained a network on such a problem like this and it's output always was the first class. i just speculate it that network consider the second class as noise. – amin msh May 07 '20 at 20:03
  • What type of neural network are you using? – Tank May 14 '20 at 11:07