Learning curve plots

I’d like to generate figures similar to the ICET paper (fig 4 and 7), how do I proceed in order to get the number of features used during the optimization?

Thanks for the help!

If you run optimization with e.g. lasso RFE or ARDR you will end up with a number of nonzero parameters (number of features). You can access this by for example opt.n_nonzero_parameters or you can of course compute it from the parameters yourself np.count_nonzero(opt.parameters).
Then you need to vary the respective hyper-parameter that controls the sparsity (number of features) , see e.g. here.

A full example can be found in this MR and check out this script.