# Predicting the Impact of Academic Key Factors and Spatial Behaviors on Students' Performance
## 4 Proposed Methodology and Results
### Results
#### 4.2.2 Experiment 2 (Exp-2)  
Experiment 2 is performed on the full dataset, which has 799 records and 47 features. In this experiment, Random Forest (RF) obtained higher accuracy using without-SMOTE as compared to Decision tree (DT), Long short-term memory (LSTM), Multi-layer perceptron (MLP), Naive Bayes (NB), and Support vector machine (SVM). This experiment is performed without SMOTE and with SMOTE. With SMOTE, we can see that LSTM achieved a higher accuracy of 90.9 as compared to other models, as shown in Figure 11. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Exp 1** & \multicolumn{4}{c}{**Without-SMOTE**} & \multicolumn{4}{c}{**With-SMOTE**} \\ \hline
**Algorithms** & **Precision** & **Recall** & **F1-Score** & **Precision** & **Recall** & **F1-Score** \\ \hline DT & 0.57 & 0.58 & 0.57 & 0.78 & 0.79 & 0.78 \\ LSTM & 0.7 & 0.63 & 0.66 & 0.86 & 0.86 & 0.86 \\ MLP & 0.73 & 0.67 & 0.69 & 0.86 & 0.86 & 0.86 \\ NB & 0.51 & 0.6 & 0.44 & 0.73 & 0.65 & 0.62 \\ RF & 0.76 & 0.6 & 0.65 & 0.88 & 0.87 & 0.87 \\ SVM & 0.71 & 0.65 & 0.67 & 0.9 & 0.9 & 0.89 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Exp1 Scores (Precision, Recall, F1-Score). \begin{table}
\begin{tabular}{c c c} \hline \hline
**Algorithms** & **Without-SMOTE** & **With-SMOTE** \\ \hline DT & \begin{tabular}{c} Criterion = gini, \\ min\_samples\_leaf = 1, \\ min\_samples\_split = 2, \\ splitter = best \\ Activation = relu, batch\_size = 7, \\ epochs = 120, last\_act = softmax, \\ \end{tabular} & \begin{tabular}{c} Criterion = entropy, \\ min\_samples\_leaf = 1, \\ min\_samples\_split = 2, \\ splitter = best \\ Activation = relu, batch\_size = 7, \\ epochs = 120, last\_act = softmax, \\ solver = adam, unit-LSTM = 95, \\ unit-Dense = 95, dropout = 0.2 \\ [(1+1) LSTM, Dense] \\  Activation = tanh, alpha = 0.001, \\ hidden\_layer\_sizes = (95, 95, 95, \\ max\_iter = 200, solver = adam \\ \end{tabular} & \begin{tabular}{c} Activation = relu, batch\_size = 17, \\ epochs = 120, last\_act = softmax, \\ solver = Nadam, unit-LSTM = 80, \\ unit-Dense = 45 dropout = 0.1 \\ [(4+1) LSTM, Dense] \\ Activation = relu, alpha = 0.001, \\ hidden\_layer\_sizes = (95, 95, 95, \\ max\_iter = 200, solver = adam \\ Default \\ \end{tabular} & \begin{tabular}{c} Activation = relu, alpha = 0.1, \\ hidden\_layer\_sizes = (87), \\ max\_iter = 200, solver = adam \\ Default \\ Bootstrap = False, \\ min\_samples\_leaf = 1, \\ min\_samples\_split = 5, \\ n\_estimators = 50 \\ \end{tabular} & \begin{tabular}{c} Activation = relu, alpha = 0.1, \\ hidden\_layer\_sizes = (87), \\ max\_iter = 200, solver = adam \\ Default \\ min\_samples\_leaf = 1, \\ min\_samples\_split = 2, \\ n\_estimators = 500 \\ \end{tabular} & \
\begin{tabular}{c} Default \\ min\_samples\_leaf = 1, \\ min\_samples\_split = 2, \\ n\_estimators = 500 \\ \end{tabular} \\ SVM &
\begin{tabular}{c} C = 100, Gamma = 0.01, \\ kernel = rbf \\ \end{tabular} & C = 10, Gamma = 0.5, kernel = rbf \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Exp1 Scores (Precision, Recall, F1-Score). With regard to precision, recall, and f1-score, LSTM performed better as compared to other models in both data sources (without-SMOTE data, with-SMOTE data) (Table 4). Detailed hyperparameter tuning of LSTM was performed in this experiment. Firstly, the number of neurons of a single LSTM layer was identified with an epoch value of 70 and batch-size value of 10. Then, the number of LSTM layers was identified by providing the best number of neurons with the same epochs and batch-size values. In the next phase, we added and found the best number of dense layers (fully connected layers) in the LSTM model, with the best-identified LSTM layers and neurons, and with the same epochs and batch-size values. In the fourth phase, the best number of neurons in the dense layer(s) were identified. In the fifth and sixth phases, several epochs and batch sizes were identified by providing them with the best values of LSTM layers, LSTM neurons, Dense layers, and Dense neurons.