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

Add GeometricMeanRarity #7

Merged
merged 11 commits into from
Jun 21, 2022
Merged

Add GeometricMeanRarity #7

merged 11 commits into from
Jun 21, 2022

Conversation

jerome-qn
Copy link
Contributor

TODO: override aggregate calculations with vectorized methods

@theelderbeever
Copy link
Collaborator

The poetry.lock file shouldn't be ignored. It provides locked in library versioning for everyone and prevents the dependency resolver from needing to run.

@dataclass
class BaseRarityFormula:

formula_name: str
Copy link
Contributor

@impreso impreso Jun 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest to 1) create enum to provide explicit formula names 2) why we need formula id if we have a name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. we don't know what the names will be, a priori
  2. gp

def score_token(token: Token) -> float:
raise NotImplementedError

# base aggregate scorers: can override more efficient methods
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed offline , can we create an efficient computation abstraction ( type alias should work it out) to perform batch-based computations in NumPy format.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gp, we will create another class to batch computations in a future PR

-- equivalent to the nth power of "statistical rarity"
'''

def score_token(self, token: Token) -> float:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a rule of thumb we should strike for 90% test coverage in the library - quality is very important to keep consistent computation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will write tests in future PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok , makes sense

@@ -0,0 +1,296 @@
[[package]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need poetry lock again?

Copy link
Contributor

@impreso impreso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice progress ! some re-factoring needed and good to go ( assuming we will write more unit tests for the calculation logic)

Copy link
Contributor

@impreso impreso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for now , we need to refactor class level documentation and add unit-tests to make sure the computation is correct.

Copy link
Collaborator

@dadashi dadashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, good progress.

@jerome-qn jerome-qn merged commit d55ebb3 into main Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants