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

Weights when combining multiple UMAP models #601

Open
candalfigomoro opened this issue Feb 24, 2021 · 2 comments
Open

Weights when combining multiple UMAP models #601

candalfigomoro opened this issue Feb 24, 2021 · 2 comments

Comments

@candalfigomoro
Copy link
Contributor

In this example #58 (comment) there was a mix_weight parameter to set a specific intersection weight.

When using the new * operator (https://umap-learn.readthedocs.io/en/latest/composing_models.html), is there a way to set a specific weight?

Could something like mapper1 * mapper2 * mapper1 give a higher weight to mapper1 (since we intersect it 2 times)? What is the proper way to do this?

Thank you :)

@lmcinnes
Copy link
Owner

Currently there is no proper way to do it -- the interface provides a quick and easy approach, but doesn't support a mix weight (the weighting is balanced between the two). It is tricky to have an API that would be both simple to use, and yet have enough flexibility. The right answer might be to add a separate compose method that can take a bunch of parameters such as the compose operator, mix weights, etc. Perhaps in an upcoming patch release (if the implementation turns out to be not too hard); perhaps in 0.6 (if things get messy). Worst case you can fall back to the approach outlined in the cited issue -- it should still work.

@RasGre
Copy link

RasGre commented Mar 27, 2023

I also have a similar question.
I work on a dataset with about 82k observations and 140 features, of which only a few are numerical and the remainder are One-Hot-encoded variables.

I saw, that umap.umap_.general_simplicial_set_intersection included a weight parameter (https://antonsruberts.github.io/kproto-audience/) - is it then preferable to use "the old approach" for conducting intersections rather than the * operator?

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