accuracy that one achieves with multi-study models compared to simpler models developed using only data from study $k$.

Recently, the use of ensemble methods has been proposed to develop generalist prediction functions based on multi-study data collections [@patil2018training; @zhang2019robustifying; @loewinger2019covariate]. In particular, stacking [@wolpert1992stacked; @breiman1996stacked] is used to combine prediction functions $\{\hat Y_k(\cdot), k = 1,\ldots , K\}$, each trained on a single study $k$, into a single generalist prediction function that targets contexts $k > K$. The weights assigned to each model $\hat Y_k$ in stacking are often derived by maximizing a utility function representative of the performance of the resulting prediction function. In this manuscript, our focus will be on collections of exchangeable studies. Nonetheless, the application of stacking does not require this exchangeability assumption, and the optimization of the ensemble weights can be tailored to settings where exchangeabilty is implausible. Importantly, stacking allows investigators to capitalize on multiple machine learning algorithms, such as random forest or neural networks, to train the study-specific functions $\hat Y_k$. We investigate within the stacking framework [@patil2018training] the optimization of the ensemble weights assigned to a collection of single-set prediction functions (SPFs), generated with arbitrary machine learning methods. Each SPF is trained 