
\begin{algorithm}[tb]
    \caption{Procedure of SCE module}
    \label{RE-SORT}
    \renewcommand{\algorithmicrequire}{\textbf{Input:}}
    \renewcommand{\algorithmicensure}{\textbf{Output:}}
    \begin{algorithmic}[1]
    % \REQUIRE BALANCING EPOCH NUMBER, BATCH SIZE
    \REQUIRE Balancing epoch number, Batch size
    \ENSURE Trained model with weight $w_\text{result}$
    \STATE Define: $n$: the number of random Fourier space
    \STATE Initialize: sample weights: $w_{\text{result}}$ = [1, 1,..., 1]
    \STATE Reload global features and weights as Eq. (\ref{eq18}), Eq. (\ref{eq19})
    % \FOR{$n \gets 1$ \TO $|X|$}
    \FOR{batch $\gets$ 1 $\TO$ Batch size} 
    \FOR{epoch balancing $\gets$ Balancing epoch number $\TO$ 1} 
        \STATE $n_X$ = $n_Y$ = epoch balancing
        \STATE Optimize $w_{\text{result}}$ with $n_X$ and $n_Y$ as Eq. (\ref{eq17})
    \ENDFOR
    \STATE Back propagate with weighted prediction loss as Eq. (\ref{eq25})
    \STATE Save features and weights in $\text{GFI}'$ and $\text{GWI}'$ as Eq. (\ref{updatef}), Eq. (\ref{updatew})
    \ENDFOR
    % \RETURN $w_{result}$
    \end{algorithmic}
\end{algorithm}
