Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor MetcalfScoring methods (#254)
* update abc.py to change `npl` to class attribute It might lead to inconsistent `npl` if both `__init__` and `setup` take `npl` as parameter. * remove `calc_score` method This method is just a wrapper on `_calc_raw_score` and `_calc_mean_std`. Better to move its code to `setup` method. * update `setup` to use `cls.npl` - use `cls.npl` - remove setup code from cache * rename objtype to type * change the format of raw score data frame * Update `get_links` to use new format of dataframe * Update metcalf_scoring.py * change LINK_TYPES to enum LinkType Update metcalf_scoring.py * update `_get_links` * add type variable ObjectType * change `obj_type` from a string value to actual data type * remove unused function * clean `get_links` * update docstrings for class attributes * use hashable object itself as index or column of dataframe E.g. use `GCF` instead of `GCF.id` as the index or column of a dataframe. This will skip the steps to look up actual object with a given id. * update the code for calculating standardised score * update unit tests * Apply suggestions from code review Co-authored-by: Giulia Crocioni <55382553+gcroci2@users.noreply.github.com> --------- Co-authored-by: Giulia Crocioni <55382553+gcroci2@users.noreply.github.com>
- Loading branch information