Skip to main content
. 2024 Jul 15;10(7):168. doi: 10.3390/jimaging10070168
Algorithm 3: Random Forest
Input: H and an RF training dataset: number of replicates and threshold.
Output: Ys and Yφ
    Let sY=HX,M=||sY||
    For r 1 to R do
        svpermutesY
        sYv=sYsv
       Build RF model from sYv to produce {ωYiγ}
       {ωviγ} and ωvmax, i=1,, M.
   Set Y~=θ
   For i 1 to M do
        Compute the Wilcoxon rank- sum test with ωYi and ωvmax
        Compute pi values for each feature Yi
       if piθ then
            Y~Y ~YiYisY
   Set Ys=θ,Yw=θ 
   Compute Y2(Y,~X) statistic to get pi value
   for i1 to ||Y~|| do
      if (pi<0.05) then
            Ys=YsYiYiY~
   Yw={Y~\Ys}
    Return    Ys,Yw