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

[DOC] ClassifierDrift #692

Open
cmougan opened this issue Dec 10, 2022 · 2 comments
Open

[DOC] ClassifierDrift #692

cmougan opened this issue Dec 10, 2022 · 2 comments

Comments

@cmougan
Copy link

cmougan commented Dec 10, 2022

In which data is the classifier drift trained?
The documentation does not state it very clear.

Classifier-based drift detector. The classifier is trained on a fraction of the combined
reference and test data and drift is detected on the remaining data. To use all the data
to detect drift, a stratified cross-validation scheme can be chosen.

@arnaudvl
Copy link
Contributor

arnaudvl commented Dec 12, 2022

The ClassifierDrift detector is trained on a portion of the combined reference set x_ref and test set x_test. If the train_size argument is a float between 0 and 1, then a random sample of size int(train_size * (len(x_ref) + len(x_test))) from the combined data [x_ref, x_test] is used for training. The held out fraction 1 - train_size is then used for testing for drift. If we instead specify n_folds as an int we apply cross-validation to ensure we leverage all the data for both training and out-of-sample testing. The n_folds argument has priority over train_size. This is clarified in the docs under the detector's usage section: https://docs.seldon.io/projects/alibi-detect/en/stable/cd/methods/classifierdrift.html#Usage

@cmougan
Copy link
Author

cmougan commented Dec 12, 2022

Thanks for the clarification and link!

I was thinking that perhaps we can improve the documentation either by extending or adding a link.
What do you think?

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

No branches or pull requests

2 participants