nnpiv.diagnostics.relative_wellposedness_effective_diagnostic

nnpiv.diagnostics.relative_wellposedness_effective_diagnostic(A, C, C_prime, e_g, *, feature_map='rff', n_features=300, gamma='auto', poly_degree=3, poly_include_bias=False, ridge_alpha=1.0, projection_ridge=1e-08, eta=1e-06, eta_mode='sigma_i', random_state=123, feature_builder=None, feature_matrix=None, mask_s=None, mask_t=None, return_details=False)[source]

Compute the post-estimation effective-direction diagnostic kappa_eff.

Parameters: A : array-like of shape (n,) or (n, d_a)

First-stage endogenous block used to construct feature functions.

Carray-like of shape (n,) or (n, d_c)

Second-stage instrument block.

C_primearray-like of shape (n,) or (n, d_cp)

First-stage instrument block.

e_garray-like of shape (n,) or (n, 1)

Estimated first-stage error direction, typically \(\widehat g - g_0\).

feature_map, n_features, gamma, poly_degree, poly_include_bias, ridge_alpha, eta, eta_mode, random_state, feature_builder, feature_matrix

Same interpretation as in relative_wellposedness_diagnostic().

projection_ridgefloat, default=1e-8

Ridge used when projecting e_g into the feature span.

mask_s, mask_tarray-like, optional

Optional stage-specific subset selectors, using the same mask/index formats accepted by relative_wellposedness_diagnostic().

return_detailsbool, default=False

If True, include projected coefficients and intermediate matrices.

Returns

Dictionary containing kappa_eff, regularized counterpart kappa_eff_reg, associated norms, and metadata.

Return type

dict

Notes

The core quantity is

\[\kappa_{\mathrm{eff}} = \frac{\|T_g e_g\|_2}{\|S e_g\|_2},\]

computed after projecting e_g onto the selected finite feature span.