reduce_tsne: Reduce Dimensionality with t-SNE

View source: R/dim_reduction.R

reduce_tsneR Documentation

Reduce Dimensionality with t-SNE

Description

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.

Usage

reduce_tsne(df, n = 2, ignore = NULL, quiet = FALSE, plot = TRUE, ...)

Arguments

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 Rtsne::Rtsne

Value

List with reduced dataframe and possible plots.

See Also

Other Dimensionality: reduce_pca()

Other Clusters: clusterKmeans(), clusterOptimalK(), clusterVisualK(), reduce_pca()

Examples

## 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)

lares documentation built on Sept. 13, 2024, 1:08 a.m.