This repo contains code for our work on the role of diversity in prediction accuracy.
Benkarim O, Paquola C, Park B, Kebets V, Hong SJ, Vos de Wael R, Zhang S, Yeo BTT, Eickenberg M, Ge T, Poline JB, Bernhardt B, and Bzdok D. (2021) The Cost of Untracked Diversity in Brain-Imaging Prediction. TBA
There are 2 main functions to evaluate the impact of diversity:
from evaluation import evaluate_diversity, evaluate_sampling
# Compare prediction performance of contiguous vs diverse sampling schemes
coef, score = evaluate_sampling(...)
# Evaluate prediction performance vs diversity
df_match, coef, score = evaluate_diversity(...)To run the code, check the example notebook. You can also run it in Binder. The example uses the sample data provided with the code. For dependencies, check requirements.txt.
The code was tested in Python 3.6-3.8.
The source code is available under the BSD (3-Clause) license.