-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(l2gprediction): add score explanation based on features (#939)
* feat(prediction): add `model` as instance attribute * feat: added `convert_map_type_to_columns` spark util * feat(prediction): new method `explain` returns shapley values * feat(prediction): `explain` returns predictions with shapley values * chore: compute `shapleyValues` in the l2g step * refactor: use pandas udf instead * refactor: forget about udfs and get shaps single threaded * chore: remove reference to chromatin interaction data in HF card * fix(l2g_prediction): methods that return new instance preserve attribute * feat(dataset): `filter` method preserves all instance attributes * feat(l2gmodel): add features_list as model attribute and load it from the hub metadata * fix: pass correct order of features to shapley explainer * feat(l2g): predict mode to extract feature list from model, not from config * feat(l2g): pass default features list if model is loaded from a path * feat(l2gmodel): add features_list as model attribute and load it from the hub metadata * feat(l2g): predict mode to extract feature list from model, not from config * feat(l2gprediction): add `model` as attribute * feat(l2gmodel): add features_list as model attribute and load it from the hub metadata * feat(l2g): predict mode to extract feature list from model, not from config * feat(l2gprediction): add `model` as attribute * chore: fix typo * chore: remove `convert_map_type_to_columns` * feat(l2gprediction): refactor feature annotation and change schema * chore: pre-commit auto fixes [...] * feat: report as log odds * feat: calculate scaled probabilities * chore(l2gprediction): remove shapBaseProbability * chore: correct typo in add_features and make schemas non nullable * fix: rename columns in pandas df after pivoting * fix: add raw shap contributions * fix(model): when saving create directory if not exists * feat(l2g): bundle model and training data in hf * feat(model): include data when loading model * feat: final version of shap explanations * fix: do not infer features_list from df * fix: get_features_list_from_metadata returned cols that were not features * refactor(model): read training data in the local filesystem w pandas * chore: successful run, remove test
- Loading branch information
1 parent
cef8afc
commit f952f6c
Showing
5 changed files
with
250 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.