T\}$ to generate the class of SPFs and predict outcomes for samples in $\{D_{t,2};t\leq T\}$. The final selection of $w$ maximizes a utility estimate that involves all predictions generated across the $M$ iterations.

2.  **Cross-set** (${\text{CV}_{\text{cs}}}$). This approach can handle LTS with overlapped $D_t$ sets and involves a pre-defined number of iterations. At each iteration, we randomly select $T'$ sets $D_t\in\mathcal D$ to generate the library of SPFs. We then predict outcomes for samples in the rest of $D_t$ sets using each member of the library. The final selection of $w$ maximizes a utility function that involves predictions generated across all interations.

### Within-set CV

We describe the ${\text{CV}_{\text{ws}}}$ procedure in the multi-study setting. It can be used to estimate generalist and specialist utilities. An $M-$fold ${\text{CV}_{\text{ws}}}$ for stacking includes four steps. Without loss of generality, we assume that $|D_t|$ is divisible by $M$ for $t=1,\ldots, T$, where $|D_t|$ is the cardinality of $D_t$.

1.  Randomly partition each index set $D_t$ into $M$ equal-sized subsets and denote them as $D_{t,m}, m = 1,\ldots,M$.

2.  For every $m=1,\ldots,M$, train $\hat Y_{t,m}^\ell$ with $\{(x_{i,k},y_{i,k});(i,k)\in D_{t}\cap D_{t,m}^c\}$ for $\ell = 1,\ldots, L$ and $t = 1,\ldots,T$.

3.  For a sample with index $(i,k)$, 