Questions tagged [tsne]

58 questions
1
vote
1 answer

Calculating adjacency matrix from UMAP connectivity?

From knn-graph, we can calculate adjency matrix using scipy package as follows: ids = df.index knn = kneighbors_graph(df.values, n_neighbors, metric = metric, mode = 'connectivity').toarray() knn = pd.DataFrame(knn,…
1
vote
0 answers

Failed building wheel for tsne Mac

I'm trying to install tsne package but got error message "Could not build wheels for tsne which use PEP 517 and cannot be installed directly". I tried updating pip by usr/bin/python3.7 -m pip install --upgrade pip as well as updating setuptools…
1
vote
0 answers

separate seaborn scatterplot legend from plot for high dimensional legend

I have a seaborn python scatterplot with a legend that is too long to fit with the main plot. Is there a way to save the legend separately. I know it can be done if I used matplotlib.axes.scatter as in this gist but I would like to use seaborn as…
SysEng
  • 43
  • 8
1
vote
1 answer

scRNA-seq: How to use TSNE python implementation using precalculated PCA score/load?

Python t-sne implementation from this resource: https://lvdmaaten.github.io/tsne/ Btw I'm a beginner to scRNA-seq. What I am trying to do: Use a scRNA-seq data set and run t-SNE on it but with using previously calculated PCAs (I have PCA.score and…
Jus MaAAS
  • 11
  • 1
1
vote
0 answers

How can I visualize word embeddings extracted with the trained Glove library using T-sne?

I'm studing with Glove on word embedding. I used the Glove trained library glove.6B.50d.txt on the first try. (train.csv) Make,Model,Year,Engine Fuel Type,Engine HP,Engine Cylinders,Transmission Type,Driven_Wheels,Number of Doors,Market…
gezgine
  • 37
  • 1
  • 8
1
vote
0 answers

How to use Tensorboard's TSNE correctly with pytorch-lightning?

I am running the following code on MNIST Namely, I am returning from every validation epoch return {"val_loss": loss, "recon_batch": recon_batch, "label_batch": label_batch, "label_img": orig_batch.view(-1, 1, 28, 28)} then using mat =…
Gulzar
  • 23,452
  • 27
  • 113
  • 201
0
votes
0 answers

How to make t-sne plots with BERT Models

I have two text classification models https://huggingface.co/samanjoy2/banglaclickbert_finetuned_sequence_classification_clickbait https://huggingface.co/samanjoy2/banglabert_finetuned_sequence_classification_clickbait I want to plot their hidden…
sam5922
  • 51
  • 6
0
votes
0 answers

t-SNE: Sklearn AttributeError: 'NoneType' object has no attribute 'split' on boolean dataframe

I have a dataframe called star_trek of size 11174 rows × 27577 columns with every column being a boolean. When I try to visualize the data using TSNE tsne = TSNE(n_components = 2, metric='manhattan', init='pca', verbose=1) tsne_data =…
Queuete
  • 1
  • 1
0
votes
0 answers

Visualizing Linear Seperability of highdimensional data

I got a highdimensional dataset X with 128 features for classification. What I would like to do is: Train a linear SVM on X. Calculate the hyperplane seperating the data samples. Apply t-SNE to the dataset X and the hyperplane such that it can be…
Eric21
  • 1
  • 1
0
votes
0 answers

TypeError: must be real number, not str in TSNE for a credit card fraud detection using auto encoder

This is the code get from github, where is about a credit card fraud detection using auto encoder. However, when I try to run it give me an error message about TypeError: must be real number, not str def tsne_plot(x1, y1, name="graph.png"): tsne…
Jack
  • 1
  • 1
0
votes
1 answer

Is there a method to use LDA gensim with TSNE?

I create a gensim LDA model and i want to present clusters words in the same graphs like TSNE : from gensim.models import LdaModel,lsimodel dictionary = Dictionary(all_texts) corpus = [dictionary.doc2bow(text) for text in all_texts] lda_model =…
alex Maia
  • 13
  • 2
0
votes
0 answers

How to Implement a good VAE for Feature Extraction

I'm currently working on a VAE and trying to use the encoder half for feature extraction,but it seems like it's giving a worse accuracy when training my model, when i'm trying to implement T-SNE graph to know how well it's embedding it seems like…
0
votes
0 answers

Plotting an array as a point in 2D space in Python?

I have some lists with a large length and I want to plot them in 2D (like a scatter plot). The thing is, I need to maintain their topology / preserve their distance when I do this mapping. If the distance(A,B) > distance(A,C), it should stay that…
0
votes
0 answers

how to plot scanpy tsne based on different conditions

I have an anndata object like this adata_all: AnnData object with n_obs × n_vars = 10000 × 14 obs: 'sample', 'batch', 'condition' var: 'n', 'channel', 'marker', '$PnB', '$PnG', '$PnE', 'signal_type', '$PnR-0', '$PnR-1', '$PnR-2', 'AB' uns: 'meta',…
minoo
  • 555
  • 5
  • 20
0
votes
1 answer

grid arrange tsne plots from a for loop in scanpy using matplotlib

I want to pu together generated tsnes from the loop below: import scanpy as sc import seaborn as sns import matplotlib.pyplot as plt # Subset the data by condition conditions = adata_all.obs['condition'].unique() # Create a grid of subplots with 1…
minoo
  • 555
  • 5
  • 20