|
Algorithm 1. Corrected Fold-Local Bandit-Style Sample Weighting |
| Input: |
| Training partition for fold f; held-out partition ; labels y; action set |
| A = {0.25, 0.50, 1.00, 1.25, 1.50}. |
| learning rate α, discount factor γ, and exploration rate ε. |
| Output: |
| Fold-local sample weights , trained residual MLP for fold f. |
| 1. Initialize a new fold-local Q-table with all values set to zero. |
| 2. For each training sample , select an action index using an ε-greedy policy. |
| 3. Assign the preliminary sample weight = A[]. |
| 4. Train a probe residual MLP on using the preliminary weights. |
| 5. Predict the labels of the same fold-local training samples using the probe model. |
| 6. Compute the reward: |
|
. |
| 7. Update using the observed reward. |
| 8. Reassign final fold-local training weights using the updated . |
| 9. Train a fresh residual MLP on using the final weights. |
| 10. Evaluate the final model once on the held-out fold . |
| 11. Discard before proceeding to the next fold. |
|
Note: The held-out fold is not used in Steps 1–9. It is used only in Step 10 for the final performance estimation. No Q-values, rewards, selected actions, sample weights or prediction outcomes were transferred across the folds. |