nnpiv.linear.L2SubGradient
- class nnpiv.linear.L2SubGradient(lambda_theta=0.01, B=100, eta_theta='auto', eta_w='auto', n_iter=2000, tol=0.01, sparsity=None, fit_intercept=True)[source]
Projected subgradient learner against an \(\ell_2\) critic.
The critic is the unit direction of the empirical moment and is zero when that moment is zero. Learner steps are projected onto the \(\ell_1\) ball of radius
B.- fit(Z, X, Y)[source]
Fit.
- Parameters
Z (array-like) – Instrumental variables.
X (array-like) – Feature or treatment matrix.
Y (array-like) – Outcome values.
- predict(X)
Predict.
- Parameters
X (array-like) – Feature or treatment matrix.
- Returns
Fitted linear function evaluated at
X.- Return type
ndarray