Skip to main content
. 2019 May 16;10:452. doi: 10.3389/fgene.2019.00452

Algorithm 1.

Dimension reduction by Information Gain and ReliefF

Input: train instances of D (merged datasets), classifierType(classification or regression)
Output: Dataset with ranked best features S
for each feature array A do
    if classifierType = classification
        then meritScorea = Compute information gain
        value of A with respect to classes Y
        else meritScorea = Compute ReliefF value of a
        with respect to classes Y
    end if
        if meritScorea≠0
            then add | meritScorea |to meritScores
        end if
end for
SortedFeatures = Sort meritScores from largest to smallest values
if |SortedFeatures| ≤ 1000
    then S = SortedFeatures
    else S = SortedFeatures{A1, A2, …, A1000}
end if
return S