Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor MetcalfScoring methods #254

Merged
merged 18 commits into from
Jun 14, 2024
Merged

Conversation

CunliangGeng
Copy link
Member

@CunliangGeng CunliangGeng commented Jun 7, 2024

After refactoring the classes or functions used by scoring methods, now it's time to refactor MetcalfScoring methods.
The basic idea of the refactoring is to simplify the steps of calculating metcalf raw score and standardised score, and try to improve the speed performance of the calculation through e.g. reducing the use of loop and look up.

It's better to review the changes commit by commit, and some commits describe the purpose of the changes.

@CunliangGeng CunliangGeng requested a review from gcroci2 June 7, 2024 15:21
@CunliangGeng CunliangGeng self-assigned this Jun 7, 2024
@CunliangGeng CunliangGeng marked this pull request as ready for review June 7, 2024 15:21
@CunliangGeng CunliangGeng force-pushed the refactor_MetcalfScoring_methods branch from 164a0b9 to fceea81 Compare June 10, 2024 09:52
Base automatically changed from uniform_attribute_name_to_id to dev June 12, 2024 08:14
It might lead to inconsistent `npl` if both `__init__` and `setup` take `npl` as parameter.
This method is just a wrapper on `_calc_raw_score` and `_calc_mean_std`.
Better to move its code to `setup` method.
-  use `cls.npl`
- remove setup code from cache
Update metcalf_scoring.py
@CunliangGeng CunliangGeng force-pushed the refactor_MetcalfScoring_methods branch from fceea81 to 51ad6f1 Compare June 13, 2024 11:23
src/nplinker/scoring/utils.py Outdated Show resolved Hide resolved
src/nplinker/scoring/utils.py Outdated Show resolved Hide resolved
Co-authored-by: Giulia Crocioni <55382553+gcroci2@users.noreply.github.com>
Copy link

sonarcloud bot commented Jun 14, 2024

@CunliangGeng CunliangGeng mentioned this pull request Jun 14, 2024
Copy link
Member Author

CunliangGeng commented Jun 14, 2024

Merge activity

@CunliangGeng CunliangGeng merged commit 10e9d87 into dev Jun 14, 2024
5 of 6 checks passed
@CunliangGeng CunliangGeng deleted the refactor_MetcalfScoring_methods branch June 14, 2024 11:28
This was referenced Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants