Comments (4)
No that's certainly quite feasible, the only catch being that you have to have computed the distance matrix first. I would be happy to work though and merge a pull request if you want to put in the work. Thanks!
from umap.
Sure, should be helpful in the cases where people have precomputed distance matrices due to large computation times and re-use the distance matrix.
I have a working implementation already (results look very nice with UMAP!) and will submit a pull request in the upcoming days.
So far I have added a precomputed
flag to make_nn_descent
that is set when the given metric is set to the string "precomputed". However, I'm still struggling with what to do with the distance function in that case, because it seems like it expects a numba function in any case.
Would you prefer a flag that changes the behaviour or a dummy distance function named precomputed
that is then checked for its name in nn_descent
?
Maybe we can come up with an even more elegant way.
If I couldn't make clear what I mean, just wait for my pull request and we can discuss the actual code.
from umap.
I think adding a dummy distance function called precomputed
to distance.py is probably the better way to go under those options (would likely have less code duplication).
Since you have the full distance matrix, however, could you not compute the nearest neighbors by an argsort across an index of the distance matrix? That might save you having to mess with nn_descent at all. Then again, if you have something that works I'm not really going to argue.
Looking forward to the PR.
from umap.
You are right, that's more elegant and faster.
from umap.
Related Issues (20)
- Access umap model node identifiers
- Allow custom distance metric with bool or int as input dtype
- bokeh.plotting AttributeError when making interactive plot HOT 1
- Numba.jit and numpy dependency problems HOT 4
- Looking for most efficient way to run transform()
- numba AOT distribution HOT 6
- Pkd
- umap 0.5.4 is causing a broken package error in Conda feedstock builds HOT 6
- When I run import umap, it takes a long time, and then the program exits abnormally without any error messages HOT 1
- Failed to save a trained Parametric UMAP model ()
- Interactive plot argument: tool - 'NoneType' object is not iterable
- auto_reduce_topic throws an error when all documents are outliers
- `tbb` optional requirement should be configurable HOT 4
- Python kernel unresponsive on using umap.UMAP().fit_transform()
- Numpy 1.24 removes long, causes import error
- No module named 'pkg_resources' HOT 2
- connectivity plot values not comparable with UMAP transform output
- Penguins example SSL error
- ZeroDivisonError while running update with new data
- No module named importlib HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umap.