## 3 Methodology
### t-Distributed Stochastic Neighbor Embedding  
t-SNE is a nonlinear machine learning dimensionality reduction algorithm. High-dimensional data are converted into two or three dimensions appropriate for scatter plotting [17]. The objective is to preserve as much of the significant structure of the high-dimensional data as possible in the low-dimensional map. Different transformations are applied in different regions such as to keep data points that are similar on a low-dimensional manifold closer together, rather than keeping dissimilar data points apart as in linear methods, such as principal component analysis (PCA).  
A second interesting feature of t-SNE is a tunable parameter, called perplexity, which balances attention between local and global aspects of data and has a complex effect on the resulting distributions. The parameter can be used to predict the number of close neighbors each point has.  
SNE calculations use Gaussian (normal) distributions and a gradient descent cost function that minimizes Kullback-Leibler divergence. While t-SNE calculations are very similar, they use Student's t-distribution to recreate the probability distribution in lower-dimensional space [17]. The two steps of the t-SNE approach are as follows: First, create a probability distribution defining the relationships between data points in k-dimensional (high-dimensional) space; second, create a probability distribution defining the relationships between data counterparts in lower-dimensional space using Gaussian (normal) distributions.  
Step 1: Conditional probability in high-dimensional space. This step determines the conditional probabilities defining potential neighbors or similarity between two points in k-dimensional space using Gaussian (normal) distributions as follows:  
\[p_{ij}=\frac{exp\Big{(}\frac{-\|x_{i}-x_{j}\|^{2}}{2\sigma_{i}^{2}}\Big{)}}{ \sum_{k\
eq l}exp\Big{(}\frac{-\|x_{k}-x_{j}\|^{2}}{2\sigma_{i}^{2}}\Big{)}} \tag{1}\]  
Figure 3: Research methodology flowchart.  
If we consider two points (\(x_{i}\) and \(x_{j}\)) chosen randomly from the dataset, the probability of \(x_{i}\) picking \(x_{j}\) as its neighbor or according to similarity is \(p_{j\,|\,i}\), which is proportional to the probability density under a Gaussian (normal) distribution centered at \(x_{i}\) with variance \(\sigma_{i}\).  
The model calculates the conditional probability for all pairs of points in the dataset. If two points are very close to each other, the value of \(p_{j\,|\,i}\) will be high (meaning that points are similar to each other), and if the points are far from each other, the value of \(p_{j\,|\,i}\) will be small (meaning that points are dissimilar to each other).  
Step 2: Conditional probability in low-dimensional space. This step finds the counterparts of similar points (\(x_{i}\) and \(x_{j}\)) in the lower-dimensional space using a Gaussian (normal) distribution.  
If we considered \(y_{i}\) and \(y_{j}\) as the lower-dimensional counterparts of the points \(x_{i}\) and \(x_{j}\), respectively, the conditional probability (\(q_{j\,|\,i}\)) for \(y_{j}\) being similar to \(y_{i}\) is shown as follows:  
\[q_{ij}=\frac{\left(1+\|y_{i}-y_{j}\|^{2}\right)^{-1}}{\sum_{k\
eq i}(1+\|y_{k }-y_{l}\|^{2})^{-1}} \tag{2}\]  
The choice of cost function parameters in t-SNE is based on pure intuition and rule of thumb as t-SNE does not have a solid mathematical basis. For example, perplexity represents the perplexity of the conditional probability distribution induced by a Gaussian kernel, the recommended value is N1/2 (where N = number of attributes or samples) and is typically between 5 and 50. The number of principal components to keep can be found through randomization of the expression matrix, while the number of iterations is simply based on the rule the more iterations the better. When the algorithm reaches convergence, a further increase in the number of iterations will only marginally change the plot and will not enhance the results significantly.