KNN Shapley was implemented using the Datascope package. As this implementation uses Knearest neighbor models to approximate Shapley values, which do not scale well with large and high dimensional datasets, a RandomUnderSampler from the imbalanced-learn package was used for undersampling, with a sampling strategy of 0.2, and a random seed according to the current replicate number.