# An Efficient Multivariate Autoscaling Framework Using Bi-LSTM for Cloud Computing
## 3 Proposed Autoscaling Framework
### Autonomic Manager
#### 3.2.2. Analyze Phase  
1. **Feature selection service**: Feature selection enables a machine learning algorithm to train faster, reduces the complexity, and makes the interpretation easier. Furthermore, it can improve the prediction accuracy if the right subset of features is chosen. Finally, it can prevent the overfitting of the model. The feature selection component accesses the collected data through the exposed API. Each feature value depends not only on its previous values, but also on other feature values. This correlation between features is important when modeling a multivariate prediction model. In this study, we used the well-known Pearson correlation feature-selection method to measure the linear relationship between two features, where the change in one feature is related to a corresponding change in other features. This is measured by the ratio between the covariance of two different features and the product of their standard deviations. Equation (1) presents the Pearson correlation, \(r_{\textit{pear}}\), and the coefficient of two resource metrics: \(X_{i}\) and \(X_{j}\). \[r_{\textit{pear}}= corr(X_{i},X_{j})=\frac{\sum_{l=1}^{T}(x_{i}^{l}-\bar{\textbf{x} }_{\textbf{i}})(x_{i}^{l}-\bar{\textbf{x}}_{\textbf{i}})}{\sqrt{\sum_{l=1}^{ T}(x_{i}^{l}-\bar{\textbf{x}}_{\textbf{i}})^{2}}}\sqrt{\sum_{l=1}^{T}(x_{j}^{l}- \bar{\textbf{x}}_{\textbf{i}})^{2}}\] (1)  
Figure 1: Proposed autoscaling framework. We denote \(\mathfrak{s}_{1}\) and \(\mathfrak{s}_{2}\) as the average values of the features \(X_{i}\) and \(X_{j}\), respectively. The Pearson correlation outputs a value between \(-1\) and \(1\), where \(1\) indicates the maximum positive correlation and \(-1\) denotes the negative correlation between the two features. The Pearson correlation will output a value of \(0\) if the two features are independent of each other. Finally, the Pearson correlation is symmetric; therefore, \(corr(X_{i},X_{j})=corr(X_{j},X_{i})\). In this study, we chose the network received throughput as the desired prediction metric. Then, we calculated the Pearson correlation value of every resource metric pair (CPU utilization, memory usage, etc.) with the network received throughput. Finally, we selected the resource metric with the highest correlation. The chosen resource metric and network received throughput were selected as the input features of the multivariate Bi-LSTM forecasting service;
2. **Multivariate Bi-LSTM forecasting service**: Time series forecasting takes the historical time series data as the input and outputs the future temporal value \(p_{t+1}\) at time step \(t+1\) or \(f_{t+p}\) at time step \(t+p\). The model is fed data that include the variable \(f_{i}\) itself and other multivariate time series variables. Using the network received throughput as an example, the model not only includes the network received throughput, but also includes other features such as CPU usage, memory usage, and disk I/O. Network received throughput refers to the amount of data that can be received from the source to the destination within a given time frame. The number of packets that successfully arrive at their destinations is measured by the throughput. Throughput capacity is usually expressed in bits per second, although it can be alternatively expressed as data per second. By predicting the network received throughput, we can estimate the number of incoming packets to our system and better provision or deprovision resources (VMs) to process those packets. For this reason, in this study, we chose the network received throughput as the desired prediction metric for preparing the scaling action described in the planning phase in Section 3.2.3. \[MD= \begin{pmatrix}md_{1,t-w}&\ldots&md_{1,t}\\ md_{2,t-w}&\ldots&md_{2,t}\end{pmatrix}