Skip to main content
. 2023 Feb 15;13(4):736. doi: 10.3390/diagnostics13040736
Algorithm 1 F-TEST and RNCA.
  • Procedure F-TEST(X, Y): training dataset

  • 01: return (wf) that produces weighted feature vectors using F-test

  • 02: select (wf) threshold

  • End procedure

  •  

  • Procedure RNCA (X, Y): a training dataset

  • 01: partition training dataset into 5 folds

  • for i=1,n do: where n is the number of the λi,k line space

  • 02: λi,k: tuning using 5-fold cross-validation

  •    for k=1,5 do:

  • 03:    call NCA(X, Y, λi,k): train NCA for λ regularization parameter

  • 04:    compute Li,k: record loss values

  •    endfor

  • endfor

  • 05: Lμ = mean(Li,k): compute average loss value

  • 06: λb=argminLμ(y|x,λi,k,Lμ): find best λb

  • 07: call NCA(X, Y, λb, ζ): ζ = @(yi,yj)1exp(|yiyj|)

  • 08: return (w) that produces weighted feature vectors

  • 09: select (w) (threshold) = 3; fixed threshold

  • End procedure