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 drift detector score methods #489

Merged
merged 8 commits into from
May 18, 2022
Merged

Refactor drift detector score methods #489

merged 8 commits into from
May 18, 2022

Conversation

ascillitoe
Copy link
Contributor

@ascillitoe ascillitoe commented Apr 22, 2022

This PR moves the distance_threshold computation from .predict() to .score() methods, for all drift detectors that perform permutation tests.

This simplifies detector predict methods, and aids consistency between the existing MMDDrift detectors and the new linear-time MMD detectors introduced by #475.

@arnaudvl
Copy link
Contributor

Note that there are other detectors where the same change needs to be made (basically every detector doing a permutation test I think), e.g. learned kernel or LSDD.

@ascillitoe
Copy link
Contributor Author

Note that there are other detectors where the same change needs to be made (basically every detector doing a permutation test I think), e.g. learned kernel or LSDD.

Ah yeh, I'll have a look at updating those too!

@ascillitoe ascillitoe changed the title MMD detector refactor Refactor drift detector score methods Apr 27, 2022
@ascillitoe
Copy link
Contributor Author

@arnaudvl I think I've covered all the necessary detectors in the latest commits (MMDDrift, LSDDDrift, LearnedKernelDrift and ContextMMDDrift).

@arnaudvl arnaudvl self-requested a review May 18, 2022 08:28
@ascillitoe ascillitoe merged commit ed5b40b into SeldonIO:master May 18, 2022
Srceh added a commit to Srceh/alibi-detect that referenced this pull request May 21, 2022
…IO#489).

Merge branch 'master' into linear_time_mmd

# Conflicts:
#	alibi_detect/cd/base.py
#	alibi_detect/cd/mmd.py
#	alibi_detect/cd/pytorch/mmd.py
#	alibi_detect/cd/tensorflow/mmd.py
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.

2 participants