-
Notifications
You must be signed in to change notification settings - Fork 552
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
[FEA] TSNE - Kullback Leiback Divergence for early stopping #863
Comments
Will the new KLDivergence prim help you here? |
Oh so in the naive kernel I already incrementally updated the KLD loss. I just didn't put it in the Barnes Hut version yet. But I'll check the new prim out. Most likely I'll continue using the naive TSNE version since no repeat calculations are made, and just P*log(P/Q) is used. Ie I have P, Q but they're not in a vector, but discarded during the algorithm. So I need an incremental version. |
What do you mean by incremental KLD version? |
@teju85 So the KL prim is KL_Prim(P, Q) and KL = sum(P * log(P / Q)) is done. In TSNE, P and Q are not formed explicity as a vector, they're formed on the go. Hence the KL divergence im using will incrementally add to KL. |
got it. Makes sense now. Thanks @danielhanchen for explaining. minor point: you can reduce a couple of lines of code in yours if you decide to use the KLDOp defined here |
Yep soz for the delay! I'll defs use that :) |
I assume the intent is to implement this after rapidsai#863 is completed, so I didn't remove it completely and just marked it as unused.
@danielhanchen Do you know the current state of this work? |
@drobison00 I haven't been able to get around to this sadly. The main aim is to find the sum for KL for each point, which can be done inside the attractive forces kernel. |
Currently only the gradient norm is used for early stopping. However, one can calculate the actual Kullback Leiback divergence during the gradient updates for further diagnosis of whether TSNE has reached a stable configuration.
The text was updated successfully, but these errors were encountered: