nnpiv.linear.sparse_ridge_l1vsl1
- class nnpiv.linear.sparse_ridge_l1vsl1(lambda_theta=0.01, B=100, eta_theta='auto', eta_w='auto', n_iter=2000, tol=0.01, sparsity=None, fit_intercept=True)[source]
Sparse linear NPIV with empirical-L2 learner regularization.
Let \(Q_X=\mathbb E_n[XX^\top]\) and \(m(\alpha)=\mathbb E_n[Z(X^\top\alpha-Y)]\). This estimator solves
\[\min_{\|\alpha\|_1\leq B}\max_{\|\theta\|_1\leq 1} \theta^\top m(\alpha) +\frac{\lambda}{2}\alpha^\top Q_X\alpha.\]duality_gap_uses the exact quadratic learner best response over the \(\ell_1\) ball, including the active-boundary case.- Parameters
_SparseLinearAdversarialGMM. (Same as) –
- fit(Z, X, Y)[source]
Fit the model.
- Parameters
Z (array-like) – Instrumental variables.
X (array-like) – Covariates.
Y (array-like) – Outcomes.
- Returns
Fitted estimator.
- Return type
self
- predict(X)
Predict.
- Parameters
X (array-like) – Feature or treatment matrix.
- Returns
Fitted linear function evaluated at
X.- Return type
ndarray