For each set of features and each training set, we built a scoring function by using Random Forest 30 (RF) regression to fit an estimator for the pK of a protein-ligand complex. We used the implementation of RF in the Python machine learning library scikit-learn . Although RF is generally robust with respect to hyperparameter choice, we tested the effect of varying the number of trees in the forest (n estimators) and the maximum number of features considered at each split (max features). We chose to set n estimators=500 and max features=0.33 as these values yielded optimal out-of-bag performance (Supporting Information Fig. ). We tested several other ML algorithms but found that RF consistently achieved the best cross-validation scores (Supporting Information Fig. ; 6; 7).