$k$ values (see for example $D_3$ in Figure \[fig:D-example\]). We call a collection $\mathcal D$ study-specific if $T = K$ and $D_t = \{(1, t), \ldots,(n_t, t)\}$, with $t = 1, \ldots, K$.

![An illustration of the relation between studies and training sets, where $\mathcal D=\{D_1,D_2,D_3\}.$[]{data-label="fig:D-example"}](subsampling.pdf)

We consider $L$ different learners —a learner is a method of generating a prediction function, such as linear regression, random forest, or a neural network. Training learner $\ell$ on set $D_t \in \mathcal D$ generates a single-study prediction function (SPF) noted as $\hat Y_t^\ell: \mathcal X \to \mathbb R$. The set of all SPFs is $\hat{\mathcal Y} = \{\hat Y_t^\ell(\cdot);\ell=1,\ldots,L,t = 1,\ldots,T\}$. Let $W$ be a subset of $\mathbb R^{TL}$. With stacking [@wolpert1992stacked], we combine the $\hat{\mathcal Y}$ components into $\hat Y_w:\mathcal X \to \mathbb R$ via:

$$\hat Y_w (\cdot) = \sum_{\ell=1}^L\sum_{t=1}^Tw_{\ell, t} \hat Y_t^\ell(\cdot),$$

where $w = (w_{\ell,t};\ell\leq L, t\leq T)$ is a vector of weights in $W$.

We want to use $\hat Y_w$ for prediction in a target population with unknown joint $(X, Y)$ distribution $\pi$. The performance of $\hat Y_w$ is quantified by its expected utility $U$, quantifying accuracy in the target population: $$U(w;\pi) = \int_{(x,y)} u(\hat Y_w(x), y) \; d\pi(x,y),$$ 