dualbounds.lee.LeeDualBounds.fit

LeeDualBounds.fit(nfolds=5, alpha=0.05, aipw=True, s0_probs=None, s1_probs=None, y0_dists=None, y1_dists=None, suppress_warning=False, verbose=True, **solve_kwargs)[source]

Main function which (1) performs cross-fitting, (2) computes optimal dual variables, and (3) computes final dual bounds.

Parameters:
nfolds : int

Number of folds to use when cross-fitting. Defaults to 5,

alpha : float

Nominal coverage level. Defaults to 0.05.

aipw : bool

If true, returns AIPW estimator.

s0_probs : np.array

Optional n-length array where s0_probs[i] = \(P(S_i(0) = 1 | X_i)\). If not provided, will be estimated from the data.

s1_probs : np.array

Optional n-length array where s1_probs[i] = \(P(S_i(1) = 1 | X_i)\). If not provided, will be estimated from the data.

y0_dists : np.array

Optional 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\). If not provided, will be estimated from the data.

y1_dists : np.array

Optional 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\). If not provided, will be estimated from the data.

suppress_warning : bool

If True, suppresses warning about cross-fitting.

verbose : bool

If True, gives occasional progress reports..

solve_kwargs : dict

kwargs to self.compute_dual_variables(), e.g., verbose, nvals, grid_size

Returns:

self

Return type:

object