Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Rtsne package in R language

Shulou Source: shulou.com Published: 2022-06-01 04:39:46 10月02日 Update

This article mainly explains "how to use the Rtsne package of R language". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use the Rtsne package of R language.

Rtsne packet dimensionality reduction clustering Analysis

Advantages and disadvantages of t-SNE

For dissimilar points, a smaller distance creates a larger gradient to repel these points.

This exclusion is not infinite (the denominator in the gradient), avoiding dissimilar points from being too far away.

Shortcoming

It is mainly used for visualization, but it is difficult to use it for other purposes.

T-SNE tends to preserve local features. For datasets with high intrinsic dimension (intrinsic dimensionality), it is impossible to map them completely to 2-3 dimensions.

The global structure is not explicitly retained. This problem can be mitigated through the PCA initialization point (using init = 'pca').

The amount of calculation is large, the time consumption is 100 times that of PCA, and the memory consumption is large.

Application

1. Identification of tumor subsets (medical imaging)

Mass spectrometry imaging (MSI) is a technique that provides the spatial distribution of hundreds of biomolecules in tissues at the same time. T-SNE, through the nonlinear visualization of data, can better analyze the intra-tumor heterogeneity of biomolecules.

2. Face recognition

Face recognition technology has made great progress, and many algorithms such as PCA have been studied in this field. However, due to the difficulty of dimension reduction and classification, face recognition is still challenging. T-SNE is used to reduce the dimensionality of high-dimensional data, and then use other algorithms, such as AdaBoostM2, random forest, logical regression, neural network and other multi-level classifiers to classify facial expressions.

R language to implement Rtsne package

Main parameters

The dimension after dimension reduction is set by dims parameter. The default is 2perplexity perplexity. The larger the parameter must be less than (nrow (data)-1) / 3theta parameter, the lower the accuracy of the result. The default is the maximum number of iterations of 0.5max_iter pca indicates whether the input original data is analyzed by PCA, and then the analyzed data is used for subsequent analysis. Generally, TRUElibrary (Rtsne) iris_unique is selected.

Tags: Data language parameters analysis classification similarity face content molecules technology gradient biology space algorithms dimensions tumor visualization learning imaging original Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Huawei Docker OPPO Reno macOS