Skip to main content
. 2022 Dec 6;12(12):2036. doi: 10.3390/life12122036
Algorithm 1 Working framework of ReliefF [35,36].
Input: for each training instance a vector of attribute values and the class value.
Output: the vector W of estimations of the qualities of attributes.
1. set all weights W [A] := 0.0;
2. for i := 1 to n do begin
3.  randomly select an instance Ri;
4.  find k nearest hits Hj;
5.  for each class C ≠ class (Ri) do
6.      from class C find k nearest misses Mj(C);
7. for A := 1 to a do
8. W[A]:=W[A]j=1ldiff(A,Ri,Hj)/(nk)+Cclass(Ri)l[P(C)1P(class(Ri))]j=1ldiff(A,Ri,Mj(C))/(nk)
9. end;