## 3 Multi-Layer Framework for Missing Values Prediction
### Framework Formulation  
There are two data types, categorical and continuous variables, in FR. Traditional imputation methods handle only the continuous variables [27; 28; 30]. They transfer the categorical variables into continuous variables before imputation. Then, the predicted categorical variables are mapped into labels. The errors in this process are unavoidable. More advanced methods are proposed to divide these two data types [24; 29; 32]. We found that categorical variables in FR are more important than the continuous ones. Customers prefer to choose rather than fill in the blanks when proposing CN, and the predicted results of categorical variables are easier to be judged by managers. A multi-layer framework is presented in Figure 3. After classifying different data types in \(\mathbf{X}^{\text{miss}}\), the complete \(\mathbf{X}\) can be obtained by layer-by-layer prediction with two different imputation methods. The 1 st layer is used for predicting missing continuous variables. We can choose one regression imputation method in the first layer. Then, the 2 nd to the \((p_{0}+1)\)th layers in the framework are used for predicting categorical variables. For example, in the second layer, we have \(p_{1}\) continuous variables with complete values in \(\mathbf{X}\), denoted as \(\mathbf{X}^{\text{miss}}_{2}\), and the missing values of the first categorical variable will be predicted. The first categorical variable is defined as the \(a\)th column in \(\mathbf{X}^{\text{miss}}_{2}\) with the minimum number \(K\) of missing values. \(\mathbf{X}^{\text{miss}}_{2}\) is then separated into four parts: \(\mathbf{Y}\in\mathbb{R}^{(N-K)\times 1}\) are the existing values in \(\mathbf{X}^{\text{miss}}_{2}(:,a)\), \(\mathbf{T}\in\mathbb{R}^{(N-K)\times p_{1}}\) are the corresponding values to the index of \(\mathbf{Y}\) in \(\mathbf{X}^{\text{miss}}_{2}(:,p_{0}+1:p)\), \(\mathbf{W}\in\mathbb{R}^{K\times p_{1}}\) are the values in \(\mathbf{X}^{\text{miss}}_{2}(:,p_{0}+1:p)\) except \(\mathbf{T}\), and \(\mathbf{P}\in\mathbb{R}^{K\times 1}\) are the \(K\) missing values to be predicted. \(\mathbf{T}\) and \(\mathbf{Y}\) are used to train a classifier, and \(\mathbf{W}\) is input into the trained classifier to predict the values in \(\mathbf{P}\), which is the predicted results of \(\mathbf{X}^{\text{miss}}_{2}(:,a)\). There are \(p_{0}\) categorical variables in FR for prediction, and the number of layers in this framework is \(p_{0}+1\). The workflow of the proposed framework is detailed in Algorithm 1, which is the mathematical expression of Figure 3. The 1 st layer of the proposed framework is conducted by a regression method \(R\) for predict the missing continuous values (\((p_{0}+1)\)-\(p\) columns in \(\mathbf{X}^{\text{miss}}\)). \(\mathbf{X}^{\text{miss}}_{2}\) is the output of the 1 st layer. Then, by counting the number of missing categorical values existing in \(\mathbf{X}_{2}^{\text{miss}}\), we have the set \(J\). The missing categorical values in the \(a\)th column in \(\mathbf{X}_{2}^{\text{miss}}\), where \(a\) is the position of the smallest non-zero element \(K_{a}\) in \(J\), are predicted by a classification method \(C\). Finally, we remove \(K_{a}\) from \(J\), and loop through the classification imputation until a complete \(\mathbf{X}\) without missing values is obtained. Figure 3: Multi-layer framework for missing values prediction.