# How to properly integrate data from multiple studies in a training/testing classification framework?

I currently have data from several studies, with each having different sample sizes and possibly different set-ups. There is a common binary variable of interest across all studies that I would like to predict. Suppose I have $$5$$ studies, $$s \in \{1, \ldots, 5\}$$, with each study having a $$Y_s$$ vector of binary outcomes, and an $$X_s$$ matrix of predictors in the columns and observations by row. One idea I have is to train a classifier method on each of the data pairs across the $$5$$ studies:

$$(Y_1, X_1), \ldots, (Y_5, X_5)$$

Then somehow aggregate them. What becomes complicated is how I should think about the training/testing set breakdowns. In other words, should I break the sets according to study and if so, how can I combine them later?

I am wondering generally if such frameworks exist for machine learning methods across many studies. Thanks.