dualbounds.lee.LeeDualBounds.cross_fit

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

Cross-fits the outcome and selection models.

Parameters:
nfolds : int

Number of folds to use in cross-fitting.

suppress_warning : bool

If True, suppresses the warning about manual crossfitting.

verbose : bool

If True, prints progress reports.

Returns:

  • s0_probs (np.array) – n-length array where s0_probs[i] = \(P(S_i(0) = 1 | X_i)\).

  • s1_probs (np.array) – n-length array where s1_probs[i] = \(P(S_i(1) = 1 | X_i)\).

  • y0_dists (np.array) – list of batched scipy distributions whose shapes sum to n. the ith dist. is the conditional law of \(Y_i(0) | S_i(0) = 1, X_i\).

  • y1_dists (list) – list of batched scipy distributions whose shapes sum to n. the ith dist. is the conditional law of \(Y_i(1) | S_i(1) = 1, X_i\).