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

SSDO query #2

Open
nsankar opened this issue Mar 22, 2021 · 2 comments
Open

SSDO query #2

nsankar opened this issue Mar 22, 2021 · 2 comments

Comments

@nsankar
Copy link

nsankar commented Mar 22, 2021

@Vincent-Vercruyssen

Just a follow up my question from transfertools , Is it correct to assume that for the following code line I took from SSDO
detector.fit_predict(Xtr, y, prior=tr_prior) ?

  • Should Xtr and y be only incremental user feedback data points(for example, 50 labeled data points from user feedback) or Should it be data with some ground truth anomaly labels plus the user feedback provided labels ?
  • train_prior and test_prior is the one I compute from the predicted labels for train and test data of a unsupervised AD algorithm like IsolationForest . Right? In such a case , when I retrain the SSDO model on iterations of user feedback when available, I can pass the same training prior obtained from isolation forest for every iteration of user feedback like i have 5 iterations as batch with each batch of feedback with 50 points?
@Vincent-Vercruyssen
Copy link
Owner

Hey @nsankar,

detector.fit_predict(Xtr, y, prior=tr_prior)

  • Xtr = all your datapoints
  • y = all the labels you have at that point (1 = anomaly, -1 = normal, 0 = I don't know)
  • tr_prior = the unsupervised prior anomaly score for each datapoint in Xtr (which you can compute using any unsupervised detector, as long as the score is properly squashed to the interval [0, 1])

The idea is that you start out unsupervised (y = vector of all 0s). Then, as you get a new batch of labels (e.g., you have shown the user some predictions and he/she corrects some of them), you refit the model with y = a vector containing 0s, some 1s and/or -1s. The obvious caveat here is that the labels you receive apply to your training data.

train_prior and test_prior are indeed computed using a separate unsupervised anomaly detector (such as the Isolation Forest) and have to be computed only once.

@nsankar
Copy link
Author

nsankar commented Mar 22, 2021

@Vincent-Vercruyssen Great . Thanks for the details. In the SSDO paper, you mention about using Active learning to acquire user labels. Was that a seperate module from SSDO?

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