Closed slebastard closed 3 years ago
May 11th, 2021 updates:
explain()
to new predictsignauxfaibles.explainability
modulepredictsignauxfaibles.explainability
, added column macro_radar
containing scores between 0 (very bad situation, high risk) and 1 (very good situation, low risk) to interface a radar plot in the front-endpredictsignauxfaibles.explainability
, added columns expl_selection
containing two lists: select_concerning
(respectively select_reassuring
) containing the list of variables that have a substantially positive/bad (resp. negative/good) contribution to the risk score. This selection was based on a nice statistical criterion on the maximal hypothetical contribution of a group of features to the global scoremodels/default/model_conf.py
and models/small/model_conf.py
, fixed a bug on the definition of FEATURES
from FEATURE_GROUPS
@vviers could you please take one last look at the modifications above?Here is a theoretical ressource to understand how radar scores were computed:
Merci pour ta review! Je m'occupe du conflit sur utils.py
Added a function
explain(sf_dataset: SFDataset, conf: ModuleType)
that explains the relative contribution of each input feature to the logistic regression declared inconf.MODEL_PIPELINE
. The function takes as input a SFDataset containing the dataset predictions were ran on, and outputs a SFDataset with two additional columns:conf.FEATURE_GROUPS
, to the failure risk scoreNote: in the future, adding a test of explain() in our e2e testing may be interesting: