daisybio / daisybio/drevalpy

Final model: save feature names for interpretability

Open
#234 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
44
Forks
12
Avg merge
7d 19h
Merged PRs (30d)
10

Description

If a final model is produced, it can be loaded like:

```{python}
from drevalpy.models import MODEL_FACTORY
enet_class = MODEL_FACTORY["ElasticNet"]
enet = enet_class.load("path/to/final_model")
enet_model = enet.model
print(enet_model.coef_)
```

Sklearn models have the option of saving feature_names_in_ when X in fit() has str names. In the gene expression-based models, we select the features with the gene list so at least it's possible to reconstruct the features. In the proteomics models and multi-omics models, it's variable.
Same for MOLIR, SuperFELTR which use the VarianceSelector.
Overall, it would probably be nice and reproducible to save the names and order of the input matrix.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.