Skip to main content
. 2022 Aug 23;22(17):6338. doi: 10.3390/s22176338
Algorithm 2. Feature selection for providing explanations
Input: userSelectedFeatures: user-selected features,
  shapValue: SHAP values for all features (see Algorithm 1),
  features: list of all features
Output: relevantFeatures: relevant feature list
  1: avgShapValshapValue¯
  2: shapFeatures{}
  3: for  featurefeatures  do
  4:    if shapValue[feature]>avgShapVal then
  5:     shapFeaturesfeature
  6:    end if
  7: end for
  8: relevantFeaturesshapFeaturesuserSelectedFeatures
  9: return relevantFeatures