dualbounds.iv.DualIVBounds.cross_fit

DualIVBounds.cross_fit(nfolds: int = 5, suppress_warning: bool = False, verbose: bool = True)[source]

Cross-fits the outcome model.

Parameters:
nfolds : int

Number of folds to use in cross-fitting.

suppress_warning : bool

If True, suppresses a potential warning about cross-fitting.

verbose : bool

If True, prints progress reports.

Returns:

ydists – for z, w in [0,1], ydists[z][w] is a list of batched scipy distributions whose shapes sum to n. the ith distribution is the out-of-sample estimate of the conditional law of \(Y_i(w) | W(z) = w, X_i\).

Return type:

list