> For the complete documentation index, see [llms.txt](https://svai.gitbook.io/research-to-the-people/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://svai.gitbook.io/research-to-the-people/ai-fundamentals/dl-applications.md).

# DL Applications

## Exploring high-dimensional data: t-SNE

An effective way to understand non-linear transformations [here.](https://distill.pub/2016/misread-tsne/)

The goal is to take a set of points in a high-dimensional space and find a faithful representation of those points in a lower-dimensional space, typically the 2D plane.

The algorithm is non-linear and adapts to the underlying data, performing different transformations on different regions.&#x20;

A second feature of t-SNE is a tune-able parameter, “perplexity,” which says (loosely) how to balance attention between local and global aspects of your data. The parameter is, in a sense, a guess about the number of close neighbors each point has. The **perplexity value has a complex effect on the resulting pictures.**&#x20;

Getting the most from t-SNE may mean analyzing multiple plots with different perplexities.

An additional hyperparameter to tune is the number of steps/iterations:&#x20;

* If you see a t-SNE plot with strange “pinched” shapes, chances are the process was stopped too early. Unfortunately, there’s no fixed number of steps that yields a stable result. **Different data sets can require different numbers of iterations to converge.**
* a default safe number for most datasets is 5000

Usually, if you re-run the algorithm on the same dataset under the same hyperparameters, you should see the same behavior, but there's always a few exceptions.

Separately, the size of clusters don't mean anything because the t-SNE algorithm adapts its notion of “distance” to regional density variations in the data set. As a result, it naturally expands dense clusters, and contracts sparse ones, evening out cluster sizes. Overall, **you cannot see relative sizes of clusters in a t-SNE plot.** Also, **distances between well-separated clusters in a t-SNE plot may mean nothing.**

**Low perplexity values often lead to non-statistically relevant clusters**. Recognizing these clumps as random noise is an important part of reading t-SNE plots. However, after appropriately increasing the perplexity, t-SNE performs something really powerful on high-dimensional normal distributions, which are very close to uniform distributions on a sphere: evenly distributed, with roughly equal spaces between points. And that's exactly what you see. In that way, it's actually more accurate than a linear projection:

![](https://799695905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LOU72uHiiqPUDv6aFli%2F-LQFVLzWofcYMngFtuW3%2F-LQFcktiwgZAQJ8hh81N%2Fimage.png?alt=media\&token=1b96ad05-5aa9-4ddc-8211-8d3aa27352be)

Sometimes you can **read topological information off a t-SNE plot, but that typically requires views at multiple perplexities**:

![](https://799695905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LOU72uHiiqPUDv6aFli%2F-LQFVLzWofcYMngFtuW3%2F-LQFjxIIgSPXwGmMdwi5%2Fimage.png?alt=media\&token=8f53a6be-95e8-47d4-887f-fd7af79d9ee3)

![](https://799695905-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LOU72uHiiqPUDv6aFli%2F-LQFVLzWofcYMngFtuW3%2F-LQFkK2TBNI0LiXsuIyu%2Fimage.png?alt=media\&token=46c6d8e8-8059-456d-b1a9-c315cd1d6824)
