positive outcome $p(y=1|s)$. At the beginning of each episode, we reset the state so that only the age, gender and race features are visible and all other features are masked. At each step of the episode, an additional feature becomes visible, corresponding to the agent’s chosen actions. The episode terminates whenever the number of steps exceeds the pre-defined number of steps, or earlier, if the agent chooses to make a guess about the patient’s outcome. Whenever the agent chooses to make a prediction, the guesser network is called to predict the outcome from the current state (i.e., from the collection of all unmasked features). The probability that the guesser assigns to the correct class (which is known during training) uses as the reward which is passed on to the agent.

### The Agent {#sec:agent}

We chose to use a DDQN agent. In our experiments this model performed at the same level or even outperformed more sophisticated recent models such as PPO [@schulman2017proximal].

### Additional Design Choices for Performance Improvements {#sec:add}

Several implementational details allow to improve the performance of the algorithm. Below we briefly describe them.

**Oversampling** Our dataset is highly unbalanced: less than 5 percent of the patients had 