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

How to download 'macosko_2015.pkl.gz' & How to save plot result as figures file #209

Closed
buaalyx opened this issue Apr 12, 2022 · 0 comments

Comments

@buaalyx
Copy link

buaalyx commented Apr 12, 2022

question one :
I'm running the openTSNE/examples/01_simple_usage.ipynb, and get the follow error message
`FileNotFoundError: [Errno 2] No such file or directory: 'data/macosko_2015.pkl.gz'
How to download the example datasets?

question two :
I want to fit my own dataset, I wrote the following code snippets:

    logits = model.get_embedding(G, feat_key, target).cpu()
    logit_array = logits.detach().numpy()
    tsne = TSNE(
        perplexity=50,
        metric="euclidean",
        n_jobs=8,
        random_state=42,
        verbose=True
    )
    embedding_train = tsne.fit(logit_array)
    fig, ax = plt.subplots(1, 1, figsize=(15, 15))
    utils.plot(embedding_train, labels, colors=utils.MACOSKO_COLORS)
    plt.tight_layout()
    plt.savefig('tsne.jpeg')

it seems embedding_train fits well, the shape is (n,2),and I change key of the colors dict of MASCO as the labels value, something like
MACOSKO_COLORS = { 0: "#A5C93D", 1: "#8B006B", 2: "#2000D7", 3: "#538CBA", 4: "#8B006B" }

But there is no point in tsne.jpeg, only the colors label
image

sorry I can't find the problem, and will you provide an simple example to save figure? Hope to get reply.

@buaalyx buaalyx closed this as completed Apr 18, 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

1 participant