pySPFM._solvers.lars.select_optimal_lambda#
- select_optimal_lambda(residuals, non_zero_count, n_scans, criterion='bic')[source]#
Select optimal lambda based on the model selection criterion (BIC and AIC).
- Parameters:
residuals (ndarray) – Residuals of the model
non_zero_count (ndarray) – Number of non-zero coefficients for each lambda
n_scans (int) – Number of scans
criterion (str, optional) – Criterion to find the optimal solution, by default “bic”
- Returns:
index_optimal_lambda (int) – Index of the optimal lambda