## 2 Background Theories
### Feature Transformation  
The Curse of Dimensionality basically means that the error increases along with the number of features. In other words, increasing the number of features does not always improve accuracy. Nowadays, this concept is applied in the fields of machine learning. In theory, increasing the dimensions can add more information to the dataset and improve its quality. Nevertheless, it rarely helps improve model performance in practice because real-world data contains more noise and redundancy [23].  
The model is likely to underfit when a dataset does not have enough features. On the other hand, it is likely to overfit when the dataset has too many features. Thus, many dimensionality reduction methods have been proposed to overcome this limitation. Dimensionality reduction is a method to eliminate some features of the dataset and create a restricted set of features that contains all the data needed to predict more efficiently and accurately. There are two methods of dimensionality reduction including feature selection and feature transformation. The key difference between them is that feature selection keeps a subset of the original features, whereas feature transformation creates a new feature that catches most of the important data.  
Principal Component Analysis (PCA) is one of the most well-known techniques for depletion reduction [24]. PCA is a feature transformation method used to reduce the dimension of massive data sets by transforming many variables to fewer, while retaining most of the information in the large set. This technique saves resources for running models and increases accuracy [25].  
In the field of stock prediction, since technical indicators depend on trend, volatility, volume, momentum and daily returns, they can generalize to various scenarios. PCA can consider a high number of technical indicators as input features without encountering the curse of dimensionality [26]. The advantages of PCA can be applied in various data sources and applications such as tourist behavior analysis [27] and offshore wind turbines selection [28]. In addition, some research indicates that combining machine learning and PCA results in significant model improvement, particularly in comparison to mature dimensionality reduction techniques [29]. The basic steps of PCA are as follows:  
* The first step is normalization of the original data to ensure that each set contributes equally to the analysis. Mathematically, the normalization equation is represented as (1) where \(x_{min}\) and \(x_{max}\) denote the minimum and maximum value of a feature, \(x\) denotes an original value and \(x_{normalized}\) denotes a new value. \[x_{normalized}=\frac{(x-x_{min})}{(x_{max}-x_{min})}\] (1)
* The second step is establishing a covariance matrix according to the normalized data matrix. Since the dataset is \(n\)-dimensional, this will result in an \(n\)\(\times\)\(n\) covariance matrix represented as matrix \(A\).
* The third step is to calculate the eigenvectors and eigenvalues of the covariance matrix to identify the principal components. The eigenvalues (\(\lambda\)) of matrix \(A\) are found by solving (2), where \(I\) denotes the same dimensional identity matrix as \(A\), which is anessential requirement for matrix subtraction. For each \(\lambda\), a corresponding eigenvector (\(v\)) can be found by solving (3).  
\[det(\lambda I-A)=0 \tag{2}\]  
\[(\lambda I-A)v=0 \tag{3}\]  
* The last step is decreasing the original matrix by sorting eigenvectors with corresponding eigenvalues from largest to smallest. The eigenvector with the highest eigenvalue becomes the principal component of the data. After that, first \(p\) eigenvalues are chosen to reduce the dimensions and then principal components are received.