stan-dev / projpred

Projection predictive variable selection
https://mc-stan.org/projpred/
Other
110 stars 26 forks source link

Add `search_control` #477

Closed fweber144 closed 8 months ago

fweber144 commented 8 months ago

This deprecates arguments lambda_min_ratio, nlambda, and thresh of varsel() and cv_varsel(). Instead, varsel() and cv_varsel() gain a new argument called search_control which accepts any control arguments for the search (as a list). Thus, former arguments lambda_min_ratio, nlambda, and thresh should now be specified via search_control (but note that search_control is more general because it also accepts control arguments for a forward search).

The main reason for this change is to allow different tuning parameters (= control arguments) for the <refmodel_object>$div_minimizer() function in search_forward() and perf_eval(). However, this change is also the most straightforward solution to ensure that fold-wise searches from cv_varsel.vsel() use the same tuning parameters as the previously run full-data search (output element args_search of vsel objects did not take ... into account).

Note that search_control = list() can be specified when the defaults of the underlying draw-wise divergence minimizer(s) should be used in a (forward) search, but not in the performance evaluation.