BookmarkSubscribeRSS Feed
MJ

Staff

Joined:

May 18, 2017

Data visualization with t-SNE and UMAP

Description

Recently, non-linear dimension-reduction and visualization algorithms, most notably t-Distributed Stochastic Neighbor Embedding (t-SNE) and uniform manifold approximation and projection (UMAP), have been widely applied to various research areas such as image processing, text mining, and genomics. This Add-in provides access to both t-SNE and UMAP R packages. It offers a user-friendly interface enabling data table navigation, data quality control, sparsity handling, intuitive parameterization, and interactive results interpretation.

 

Usage Example

Here is a screenshot of the interface with MNIST data loaded. Under Model Specifications, I selected the label column as Label and all the pixels as predictors. I chose both t-SNE and UMAP as the algorithms.

 

Embedding_Interface.png

 

Another screenshot of the results of both t-SNE (top) and UMAP (bottom).

 

tSNE&UMAP.png

 

This add-in also supports some basic quality control options, including missing value checking, distribution, and sparsity calculation. You can find these options under Quality Control Options on the interface.

 

Updates: JMP R interface on Mac has versioning issues. Please downgrade your R to version <=3.3.3, and use t-sne only if you are a Mac user. 

 

Changelog:

v.1.2 <3/14/2019> Fixed an issue in Rtsne package where a large number of columns causing stack overflow problem.
v.1.1 <3/8/2019> Fixed a bug that could potentially produce “issues found in R, memory exhausted?” error message. Added a submenu for the MNIST example dataset.

v.1.0 <2/26/2019> Initial version.

Comments
mujahida

Hi! MJ,
Can I understand that, in above photos, each mass/group of points can be treated as the same attribute? or different color points should be treated as different attribute?

MJ
Hi Mujahida,
The colors indicate true labels for this dataset, so data points with the same color should have similar attribute. The clusters were estimated by t-SNE and UMAP, you should see some color mismatches.
marxx

Hi MJ, 

 

I am getting an error message when I try this addin. It looks like it is not recognizing my installation of R. Would you be able to help figure out how to get your addin to recognize my R installation if that is indeed the issue?

 

I am including a screenshot showing that R is open but not being recognized, and a screenshot of my R install location (not program files) and also copying some of the error message below.

 

This looks like a very exciting tool and I am hoping to use it. I've previously found t-sne in R to be useful and it would be of great value to be able to do this right in JMP. Any help you might provide is greatly appreciated.

 

Thanks!

 

Screenshots of error and open R instance, then screenshot of R install location

t-sne addin not recognizing R install.pngr install location.png

 

Error code

 

"

An installation of R cannot be found on this system. JMP R support requires R version 2.9.1 or higher in access or evaluation of 'Glue' , write2lastRun( pb2, _addinPath_ );
algr = cbb << get selected();
Print( "Got algr!" );
Try(
dim1 = dimBx1 << get;
per1 = perBx1 << get;
iter1 = iterBx1 << get;
);
Try(
dim2 = dimBx2 << get;
per2 = perBx2 << get;
iter2 = iterBx2 << get;
dist = distbox << get;
);
Print( "Got parameters!" );
Try( predictor = selectedX << getitems );
If( Length( predictor ) < 1,
Throw( "Please specify Predictors" )
);
Try( labelY = selectedY << getitems );
If( N Items( labelY ) > 0,
labelY1 = labelY[1];
grphVars = Eval Insert( "X( :Y2 ), Y( :Y1 ), Color( :^labelY1^ ) " );
,
labelY1 = "";
grphVars = "X( :Y2 ), Y( :Y1 )";

***** Text Truncated *****"

 

 

MJ
Hi marxx,
Your problem was likely caused by multiple installations of R on your machine and JMP couldn't decide which one to use. Please try to set R_HOME as an environmental variable as following and try this add-in again. Open Window CMD console and type: setx R_HOME "This PC\Documents\R\R-3.5.2". And make sure Rtsne and umap packages are installed to this version of R. Please let me know if this solves your problem.
Also, we have a few threads on the community talking about this issue that you can check out.
https://community.jmp.com/t5/Administration-Discussions/Help-JMP-find-R-installation/td-p/6357
https://community.jmp.com/t5/Discussions/Setting-path-to-R-location/td-p/59764