View source: R/dim_reduction.R
reduce_tsne | R Documentation |
t-SNE takes high-dimensional data and reduces it to a low-dimensional graph (1-3 dimensions). Unlike PCA, t-SNE can reduce dimensions with non-linear relationships. PCA attempts to draw the best fitting line through the distribution. T-SNE calculates a similarity measure based on the distance between points instead of trying to maximize variance.
reduce_tsne(df, n = 2, ignore = NULL, quiet = FALSE, plot = TRUE, ...)
df |
Dataframe |
n |
Integer. Number of dimensions to reduce to. |
ignore |
Character vector. Names of columns to ignore. |
quiet |
Boolean. Keep quiet? If not, print messages. |
plot |
Boolean. Create plots? |
... |
Additional parameters passed to |
List with reduced dataframe and possible plots.
Other Dimensionality:
reduce_pca()
Other Clusters:
clusterKmeans()
,
clusterOptimalK()
,
clusterVisualK()
,
reduce_pca()
## Not run:
data("iris")
df <- subset(iris, select = c(-Species))
df$id <- seq_len(nrow(df))
reduce_tsne(df, ignore = "id", max_iter = 800, perplexity = 20)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.