Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jkrijthe/Rtsne
R wrapper for Van der Maaten's Barnes-Hut implementation of t-Distributed Stochastic Neighbor Embedding
https://github.com/jkrijthe/Rtsne
Last synced: 16 days ago
JSON representation
R wrapper for Van der Maaten's Barnes-Hut implementation of t-Distributed Stochastic Neighbor Embedding
- Host: GitHub
- URL: https://github.com/jkrijthe/Rtsne
- Owner: jkrijthe
- License: other
- Created: 2014-01-22T16:34:59.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-12-07T01:23:02.000Z (11 months ago)
- Last Synced: 2024-05-21T01:06:16.141Z (6 months ago)
- Language: C++
- Size: 608 KB
- Stars: 253
- Watchers: 19
- Forks: 66
- Open Issues: 4
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output:
github_document:
html_preview: false
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
[![CRAN version](http://www.r-pkg.org/badges/version/Rtsne)](https://cran.r-project.org/package=Rtsne/)
[![R-CMD-check](https://github.com/jkrijthe/Rtsne/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jkrijthe/Rtsne/actions/workflows/R-CMD-check.yaml)
[![codecov.io](https://codecov.io/github/jkrijthe/Rtsne/coverage.svg?branch=master)](https://app.codecov.io/github/jkrijthe/Rtsne?branch=master)
[![CRAN mirror downloads](http://cranlogs.r-pkg.org/badges/Rtsne)](https://cran.r-project.org/package=Rtsne/)# R wrapper for Van der Maaten's Barnes-Hut implementation of t-Distributed Stochastic Neighbor Embedding
## Installation
To install from CRAN:
```{r, eval = FALSE}
install.packages("Rtsne") # Install Rtsne package from CRAN
```
To install the latest version from the github repository, use:
```{r, eval = FALSE}
if(!require(devtools)) install.packages("devtools") # If not already installed
devtools::install_github("jkrijthe/Rtsne")
```## Usage
After installing the package, use the following code to run a simple example (to install, see below).
```{r example, fig.path="tools/"}
library(Rtsne) # Load package
iris_unique <- unique(iris) # Remove duplicates
set.seed(42) # Sets seed for reproducibility
tsne_out <- Rtsne(as.matrix(iris_unique[,1:4])) # Run TSNE
plot(tsne_out$Y,col=iris_unique$Species,asp=1) # Plot the result
```# Details
This R package offers a wrapper around the Barnes-Hut TSNE C++ implementation of [2] [3]. Changes were made to the original code to allow it to function as an R package and to add additional functionality and speed improvements.# References
[1] L.J.P. van der Maaten and G.E. Hinton. "Visualizing High-Dimensional Data Using t-SNE." Journal of Machine Learning Research 9(Nov):2579-2605, 2008.[2] L.J.P van der Maaten. "Accelerating t-SNE using tree-based algorithms." Journal of Machine Learning Research 15.1:3221-3245, 2014.
[3] https://lvdmaaten.github.io/tsne/