luigibonati / mlcolvar

A unified framework for machine learning collective variables for enhanced sampling simulations
MIT License
91 stars 24 forks source link

Interpretability module: sparse linear models via LASSO #120

Closed luigibonati closed 2 months ago

luigibonati commented 7 months ago

Description

Add sparse linear models optimized via LASSO as tools for interpreting the CVs and/or the resulting states, as done here: https://pubs.acs.org/doi/abs/10.1021/acs.jctc.2c00393.

I started from the notebook that @pietronvll and I did. We implemented both the classifier case (as done in stateinterpreter) and also the regression one. A few changes:

For both the regression and classification the signature is (almost) the same, with both returning the optimized estimator together with the list of non-zero features and their coefficients. I also did separate functions to plot the results (coefficient paths, score and number of features).

Todos

Notable points that this PR has either accomplished or will accomplish.

Tutorials

Work in progress

Questions

Status

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 91.90751% with 28 lines in your changes missing coverage. Please review.

Project coverage is 92.50%. Comparing base (3f9adeb) to head (71ad599).

Additional details and impacted files
luigibonati commented 2 months ago

I have put everything into a new explain submodule, containing sensitivity analysis and sparse models

will merge it soon