question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

umap.plot support for cuml.umap objects

See original GitHub issue

Hello! First of all thanks for this amazing package! I wanted to raise an issue that I know does not strictly involve this code base but that you may be able to help with:

I want to use the umap.plot functions with cuml.UMAP objects(I’ve already raised an issue on the cuml side. I know this may not concern but I thought you could perhaps help. As of now my code does not run if I pass a cuml.UMAP object the same way it would if I pass it a umap.UMAP object. If you have access to a GPU this code should not run for the cuml.UMAP object:

import sklearn.datasets
import pandas as pd
import numpy as np
import umap
import cuml
import umap.plot

pendigits = sklearn.datasets.load_digits()

mapper = umap.UMAP().fit(pendigits.data)

umap.plot.points(mapper, labels = pendigits.target)

### Now cuml

mapper = cuml.UMAP().fit(pendigits.data)

umap.plot.points(mapper, labels = pendigits.target)

I am not able to paste the whole error log here because the GPU I have access to is from work and there is a firewall in my workplace that does not allow me to write issues or comments in GitHub. The main error I get goes something like:

'c' argument has 1797 elements, which is inconsistent with 'x' and 'y' with size 0

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lmcinnescommented, Aug 8, 2020

Thanks – that looks like a relatively easy fix. I will try to add a check and do the conversion if it is a CumlArray soon.

0reactions
lmcinnescommented, Aug 14, 2020

So I started to refactor things a little. I’ll add the CumlArray conversions once I figure out how to properly test for that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic UMAP Parameters — umap 0.5 documentation
UMAP is a fairly flexible non-linear dimension reduction algorithm. ... We can visualise the result by using matplotlib to draw a scatter plot...
Read more >
cuML API Reference — cuml 22.10.00 documentation
Partitions device data into four collated objects, mimicking Scikit-learn's train_test_split. Parameters. Xcudf.DataFrame or cuda_array_interface compliant ...
Read more >
umap Documentation - Read the Docs
Finally we'll need some plotting tools (matplotlib and seaborn) to help us visualise the results of UMAP, and pandas to make that a...
Read more >
Bringing UMAP Closer to the Speed of ... - AAAI Publications
inform the conversion of other graph and manifold learning algorithms to use GPUs. ... (Maaten and Hinton 2008), UMAP has native support for...
Read more >
How UMAP Works | Hacker News
If you have access to a GPU, it's worth checking out cuML's UMAP implementation ... The reason we do graph to beginwith is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found