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

review expectations of incremental training in various objects - was UMAP incremental training doesn't work #189

Open
tremblap opened this issue Jul 17, 2022 · 4 comments
Assignees

Comments

@tremblap
Copy link
Member

this patch illustrates how 100x 1 iteration (actually 1000x neither, I tested) is not getting anything beyond the first result, compare to the first result of 100 iteration in one go.

I reckon there is a state that gets lost or not passed between iterations?


----------begin_max5_patcher----------
2744.3oc6aszjihiD9rqeEDN1idcfjP7XNM69CXurGmYBGBP1EciAVPTcU6D
y7ae0CdHrAL1.UUSuccvksDBx7KSkYpLS98m1r0O8UZwViex3WL1r42eZyF4
PhA1T86MaOSdMHlTHursAomOSSXa2oliQekIGGXDwn4DVTZhAgYPLXQmo0WU
R44njXJSdK.sClVxpG0rZznP4sK0+K+cjc85yHrfmiRNcHmFvTTqEBu2bmA.
4J+G1T7OH+SieSrl+3omDeratbkoYKeMStAOB2.Lg1RFvyZIXmyzhBxI5UrS
VZTBqH5+RKBHwTCy83d4IXu7D3ZdB5Vud00wdKipXnsaM9sQXWfsjcwVJomo
jqgvGjcSneiSMWwsGiKiB2mjlelDy44+7Njevq4UvH75tavudV.ACZgj+yCs
FbaNmrnFgkmytCYZe7I3w4S91EnTthkhWauYwnCoEmSORyM9avc2K21iF7Cp
.WKPskJttNqm5aHgQJnrYp7hmstKFH0ZcMWOVs7LI6OM9YNyDx8cjTvM4VX.
M94FCvEBEr4ADvIBDAowo4pYL2aAQXtkY.vw1xwzdmvvI.4.wVdl.OaSGWtM
LogLArLFTJQOjsz0Ez1cU1dbLhwxIIEG4F9LdlFmIA18f8jDR7aEQEyaGC5A
2w3IQHDT411EOKd+KEkQixF9o4gzbcWweofjepT3kunVthaH3aaUr04cN4Lk
qQdflP7io5OhanScLJlulyTMU9r3TF+dMZjAlxMd1U9HcLa92hp0DDSI4ySy
.X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3fZz8ei7xxkr6lv.6G.Ox8Wwlbk4PPjxGaUiF69Wg7d6NeMH
fUss1uOS8M3VM9.zUWv+Y.BtYAbyoh.wFqx+nAgIz.6klPKQLkhGAsj5Sh2S
NGQ4ibd2KJoDbtv5y4iAA6+RgnGaevFlXfMfdyqtSp2rNnsmLeR.7mnBdewa
f6BXtdAp3sBuPlt6Ax1cp5sBYHDaUphAbh4DyaESL2TyKLbEoAuIRC3UjFlZ
99gqIPHu4SgJ.t2LKy7.4vsu3AZ+5F52xPoGPAu4jXbqB1Zmlr8.a8ynjf.t
KuN0UTVhSWjGDHe4JbL8bMstthmW+JC09gVJW515iGhRDmFmV+rL2o8wEYZe
mlvJWjNmqNIg.a4bVjdwl5SX2AbtH5rwgmddySjueVxW2DYoWcrvf2KR+JOh
iS79mNFEG2vBat5JFtVy7YJYomxIgQUQD0Yxt0gV9d2HgkJUEw23CAtRooZk
fFUMa9eN658a8uTX8Rae6zt9aWszKqFNxSe1ZGTaa32lI0DkKtV706TueMhK
Cj9NzlkzqEt9UNzhK53vxRoI+IujPR0itALnRp5k9EpRs509C5Xl+1UL6pr2
N4GzTdNtKvCBLENZQdPf2InqSfCC8bVhGzTPN7B7bPS34.WhmyTT5fVKg18T
zEPKAOYgmhVm2RvSSA8rVD8AyoHmVBzyaBOH6E34XOEgTWtta6F83VklBVBf
uS7HZ.dDLOdz5wzWTdKunRZhGxEUP6hpmcckyFtpYWVwLYfCCUorm9im9erA
zXoG
-----------end_max5_patcher-----------
@weefuzzy
Copy link
Member

weefuzzy commented Jul 17, 2022

The object wasn't designed to support incremental training from what I can see. Where did the expectation that it does come from?

@tremblap tremblap reopened this Jul 17, 2022
@tremblap
Copy link
Member Author

Like all other iterative process we have. it is even in the learn material. I'll leave that open as this is the only one that doesn't do it in our toolset as far as I know, or at least we have some that do and some that don't which is far from a good idea - this comes from a user that was unprompted and following our interface design expected that to be the case...

@weefuzzy
Copy link
Member

Apologies, closed by mistake.

Apart from the MLP, which iterative processes did you have in mind? KMeans doesn't support this: incremental fitting has to be done by hand. NMF only kind of does, to the extent that its complete state can be represented in a couple of buffers. As far as I can see, MLP is the odd one out here.

Looking at the code, I'm not even sure what incremental fitting would entail for UMAP. There are a series of convergent processes, and the iteration count only pertains to the last of these (optimising the layout), once the embedding has already been learnt (for which we use library code). So fit can't be incremental.

If you call transform, it is using the learned embedding (but not changing it?) on a whole new input dataset, assumed to be high dimensional, applying the embedding and then optimising the layout. Making the layout optimisation incremental would entail some other method that took a low dimensional input and updated that with n iterations of layout optimisation.

So, my view is that this not a bug, but a feature request that I'm not sure is actually possible (or at least simple) with the code we have.

@tremblap
Copy link
Member Author

thanks for the explanation. We should definitely make it clearer in the doc if this feature request is not possible.

But (s)kmeans support(s) it. There is even a tab showing how it works :) so with MLP there is something of an (wrong) assuption that it should happen in everything iterative, which is obviously wrong, so when I'm rested post holidays I'll review iterative assumptions and expectations. I'm changing the ticket name now and will assigned to me (and maybe @gerard so we can discuss that)

thanks again for your patience

@tremblap tremblap self-assigned this Jul 17, 2022
@tremblap tremblap changed the title UMAP incremental training doesn't work review expectations of incremental training in various objects - was UMAP incremental training doesn't work Jul 17, 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

No branches or pull requests

3 participants