Skip to main content
. 2025 Jul 24;25(15):4590. doi: 10.3390/s25154590
Algorithm 1: Prediction algorithm process in TKDF—TKDF for Time-Series Prediction
Input: Historical timestamp S, future timestamp T, historical sequence X
Output: Future sequence Y
Hyperparameter: Learning rate r, weight α,β
1. Initialization: Network θ1 and Network θ2
2. [The pre-training stage]: utilize S to predict X
3. for iter<iters do:
4. Calculate self-distillation loss: Ls=αLs(H)+(1α)Ls(S)
5. Update parameters of the timestamp mapper: θs=θs+rLsθs
6. end for
7. [The Multi-branch Prediction Stage]: utilize T and X to predict Y
8. for iter<iters do:
9. Calculate mutual learning loss of network θ1: Lθ1=βLθ1(H)+(1β)Lθ1(S)
10. Calculate mutual learning loss of network θ2: Lθ2=βLθ2(H)+(1β)Lθ2(S)
11. Update parameters of network θ1: θ1=θ1+rLθ1θ1
12. Update parameters of network θ2: θ2=θ2+rLθ2θ2
13. Update the prediction result
14. End for