# Detection of Students' Problems in Distance Education Using Topic Modeling and Machine Learning
## 3 Materials and Methods
### Multi-Layer Classification Model  
Many approaches in the literature have been developed to address a multi-class classification problem. However, the most common solution is to decompose the multi-class classification problem into a set of binary classification problems. One of these methods is called one-versus-all [31]; the basic concept of this method is conducting a binary classifier for each label with assuming independence among the labels. Based on this mechanism, we performed a multi-class learning by using standard support vector machines (SVMs). If we have k classes, then SVM classifiers are constructed for each class. Every classifier is trained to distinguish the samples of one class from the samples of all the other classes. To predict a new sample, the sample is classified by all k classifiers, and then, the class with the maximum decision value is chosen.  
Our classification approach includes two layers of a multi-class SVM classifier. The topics that were produced from the annotation stage in the second phase are used as classes for classification of the tweets in the entire dataset. The general set of classes is (education issues, social issues, technology issues, health issues, and attitudes and ethical issues), which represents the general categories. The other set of classes is (professor-student interaction, lack of focus, student-student interaction, lack of time, lack of social interaction, poor internet connectivity, lack of tech equipment, overuse of digital technologies, stress and anxiety, lack of motivation, and cheating) that represents the sub-categories. The first classifier is trained to predict if the tweet belongs to one of the basic categories. The second classifier is used to predict if the tweet belongs to sub-categories. We implemented the two classification tasks in a multi-layer classification model. In the upper layer, the multi-class classifier for the categories is applied. Then, the predicted category will be passed as a feature to the lower layer to classify the tweet as a sub-category. To avoid the misclassification that could occur on the upper level, all sub-category classifiers are applied in the lower level.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Education Issues**} & \multirow{2}{*}{**Social Issues**} & \multirow{2}{*}{**Technology Issues**} & \multirow{2}{*}{**Health Issues**} & \multirow{2}{*}{**Atitude and Ethical Issue**} & & \\  & & & & & & & & \\  & Studying & \(\downarrow\)\(\downarrow\)\(\downarrow\) & We miss & \(\downarrow\)\(\downarrow\)\(\uparrow\) & Net & \(\downarrow  
Features extraction is an essential step in the classification process in order to represent the tweet text as numerical vectors. For features extraction, we extracted two features as follows:  
* The top 20 words with the highest probability of occurrence that are extracted from BTM for each category are used to build a set of features that is used for classification in the first layer.
* N-gram is a set of consecutive order of words based on the value of N. We extracted the bigram where N = 2 is to be used for classification in the second layer.  
The experiment is performed using Python language version 3.7.10; we used scikit-learn library [32] to implement the multi-class SVM classifiers. The random sample of tweets that was used to train BTM algorithm was also used to train and fit the multi-class SVM classifier. We first partitioned the data into 70% training set and 30% test set to train and fit the classifiers. Then, we applied the classifers on the rest of the data.