non_zero_dists might be size 0
See original GitHub issueThis does not seem to be an issue when the function is annotated with
@numba.njit(
fastmath=True
)
But when removing it, it will sometimes throw:
rho[i] = interpolation * non_zero_dists[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
This happens when non_zero_dists = ith_distances[ith_distances > 0.0]
will return no indices for numpy to select.
Example: 2 points, n=2, local_connectivity=0.0
https://github.com/lmcinnes/umap/blob/d5d995625b5cfe55430771e4ec2f044533da7b4c/umap/umap_.py#L118
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
When a Size 0 Isn't Really 0: The Psychology Behind Top ...
A Lanvin size zero, with Alber Elbaz's soft, feminine, flowy cuts, would fit on a regular U.S. size 4 or 6. Though Italians...
Read more >umap-js/umap.ts at main · PAIR-code/umap-js - GitHub
embeddings. If None is specified a value will be selected based on. * the size of the input dataset (200 for large datasets,...
Read more >Size zero - Wikipedia
Size zero or size 0 is a women's clothing size in the US catalog sizes system. Size 0 and 00 ... Size 00...
Read more >The Johnson-Lindenstrauss bound for ... - Scikit-learn
The Johnson-Lindenstrauss lemma states that any high dimensional dataset can be randomly projected into a lower dimensional Euclidean space while ...
Read more >66_random_projections
johnson_lindenstrauss_min_dim estimates the minimal size of the random subspace ... eps = max distortion rate per johnson-lindenstrauss lemma, [0..1] from ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve got the dense case finished and the few unit tests I’ve written seems to be working well. The next step is to get the sparse one finished (more unit test) and a then the detection heuristics.
On Wed, Aug 28, 2019 at 8:14 AM Leland McInnes notifications@github.com wrote:
@lmcinnes Coming back to support for equidistant nearest neighbors. I have added a rough implementation and a small example in https://github.com/lmcinnes/umap/tree/equidistant_neighbors
When you run
devel/test.py
it will print the mean distance across multiple runs of the center point[0,0]
to its neighbors which are all the same distance away from[0,0]
. Running this on themaster
branch code will yield a higher on average distance of points around[0,0]
after embedding with UMAP than it does on theequidistant
branch.Points are aligned like this
Where all
x
have a distance of 1 too
.