hidimstat.desparsified_lasso_pvalue#
- hidimstat.desparsified_lasso_pvalue(n_samples, beta_hat, sigma_hat, precision_diagonal, confidence=0.95, distribution='norm', epsilon=1e-14)[source]#
Calculate confidence intervals and p-values for desparsified lasso estimators. This function computes confidence intervals for the desparsified lasso estimator beta_hat. It can also return p-values derived from these confidence intervals. Parameters ———- n_samples : float
The number of samples
- beta_hatndarray, shape (n_features,)
The desparsified lasso coefficient estimates.
- sigma_hatfloat
Estimated noise level.
- precision_diagonalndarray, shape (n_features,)
Diagonal elements of the precision matrix estimate.
- confidencefloat, default=0.95
Confidence level for intervals, must be in [0, 1].
- distributionstr, default=”norm”
Distribution to use for p-value calculation. Currently only “norm” supported.
- epsilonfloat, default=1e-14
Small value to avoid numerical issues in p-value calculation.
Returns#
- pvalndarray, shape (n_features,)
P-values
- pval_corrndarray, shape (n_features,)
Corrected p-values
- one_minus_pvalndarray, shape (n_features,)
1 - p-values
- one_minus_pval_corrndarray, shape (n_features,)
1 - corrected p-values
- confidence_bound_minndarray, shape (n_features,)
Lower bounds of confidence intervals
- confidence_bound_maxndarray, shape (n_features,)
Upper bounds of confidence intervals