Skip to main content
. 2025 Jul 25;25(15):4611. doi: 10.3390/s25154611
Algorithm 1 Adaptive Sample Scheduling Module
1: procedure AdaptiveTraining
2:     Initialization:
3:     θ←RandomInit() ▹ Model parameters
4:     H←∅ ▹ Hard sample repository
5:     S←Sinit,Q←Qinit
6:     ρ←SS+Q ▹ Initial support ratio
7:     no_improve_count←0 ▹ Stagnation counter
8:     Abest←−∞ ▹ Best accuracy
9:     while not converged do
10:           MiniBatchTraining(θ, S, Q)
11:            if epochmodT=0 then
12:                  Aval←Evaluate(θ)
13:                  if Aval>Abest then
14:                        Abest←Aval
15:                        no_improve_count←0
16:                        H←H∪CollectHardSamples()
17:                  else
18:                        no_improve_count←no_improve_count+1
19:                        if no_improve_count≥τ then
20:                              ρ←min(ρ+ρstep,ρmax)
21:                              N←S+Q ▹ Maintain total samples
22:                              S←max(⌊ρN⌋,1)
23:                              Q←max(N−S,1)
24:                        end if
25:                  end if
26:            end if
27:     end while
28:     return θ
29: end procedure