Final model: save feature names for interpretability
- 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
Assessment
This issue has not been assessed yet.