# Text Data Mining Algorithm Combining CNN and DBM Models

Authors: Rong Dai
Journal: Mobile Information Systems
 (2021)

---

## Abstract

The special text has a lot of features, such as professional words, abbreviations, large datasets, different themes, and uneven distribution of labels. While the existing text data mining classification methods use simple machine learning models, it has a bad performance on text classification. To solve this drawback, a text data mining algorithm based on convolutional neural network (CNN) model and deep Boltzmann machines (DBM) model is proposed in this paper. This method combines the CNN and DBM models with good feature extraction to realize the double feature extraction. It can realize the tag tree by constructing the tag tree and design the effective hierarchical network to achieve classification. At the same time, the model can suppress the input noise on the classification. Experimental results show that the improved algorithm achieves good classification results in special text data mining.


---

## Body

## 1. Introduction

With the in-depth study of text classification model in industry and academia, text information presents the phenomenon of exponential growth. Data mining of massive information to extract effective information has become a hot issue.Text data mining is defined as the induction process of a single or multiple categories of objects based on different characteristics of the document data. Initially, text classification method is mainly used in a large number of naive Bayes machine learning methods [1]. Then, a series of machine learning algorithms including K-nearest neighbor algorithm [2], support vector machine (SVM), neural network [3], least squares [4], and decision tree [5] have been widely used in the field of text classification. Recently, the application of SVM has become a hot research direction for researchers in the field of text classification [6]. However, K-nearest neighbor algorithm, least square, and decision tree are used in simpler models with higher efficiency and can be optimized and improved based on these methods. Literature [7] proposed graph neural networks (GNN) based text inductive classification method. It first adopted GNN to learn fine-grained word representations based on their local structures and then aggregated word nodes into document embedments to obtain classification results. Literature [8] proposed a new term weighting strategy, which makes more effective use of the nonoccurrence information of terms. The proposed weighting strategy also performs intraclass document scaling to better represent the discrimination ability of terms appearing in different document numbers of the same number of classes.In terms of improving generalization ability, a selective integration theory is proposed, which has achieved good results for text classification applications. However, these models are the kind of shallow methods. When the data to be processed are massive and high-dimensional data, its classification is called complex data classification. When faced with complex data classification problems, the limitations of the algorithm based on this theory will be obvious. Specifically, the generalization ability is insufficient, and the requirements for text classification cannot be met. Therefore, how to obtain a deep machine learning method with strong generalization ability has become the mainstream of research.The task of text classification can be divided into three steps: text preprocessing, text representation, and classification model construction. To manage the text information well, it is necessary to extract and classify text content scientifically and reasonably. The previous text representation is generally in the form of a count. This approach has two drawbacks. First, this method needs to assume that words are independent from each other, but the actual words are all related to each other, which leads to the neglect of the text language between words. Second, the interference of human factors is required when selecting features, which results in the extracted features having quotient dimensions and sparseness, and the representation and generalization ability of the text are very poor. In addition, for special texts, it has a large number of professional words, abbreviations, large datasets, diverse topics, and uneven label distribution. A simple machine learning model is used by the existing special text categorization methods to reduce the performance of text categorization.The contributions of this paper are as follows:(1)
To overcome the shortcomings of the abovementioned classification methods, a text data mining algorithm based on convolutional neural network (CNN) model and deep Boltzmann machines (DBM) fusion is proposed in this paper.(2)
This method combines two models to achieve dual feature extraction. Tag tree is realized by constructing tag tree and designing effective hierarchical network.(3)
At the same time, the effect of input noise on classification can be suppressed. It can effectively classify a large number of specialized words, abbreviations, and short text in documents and perform well.The structure of this article is as follows. Section2 introduces the general methods of big data mining. Section 3 introduces the recommendation algorithm. Section 4 shows the experimental results and analysis.


## 2. Common Text Classification Methods in Data Mining

There are two main methods of text classification: rule-based and statistics-based. At present, popular machine learning methods mainly include support vector machine (SVM), logistic regression, naive Bayes, decision tree, K-nearest neighbor, artificial neural network, integrated learning, tag correlation classification, and hierarchical classification methods.Support vector machine (SVM): the principle of SVM is to find a hyperplane to meet the classification requirements so that the points in the training set can be separated from the classification plane as far as possible. When it comes to convergence training on big data, the SVM speed is very slow. It needs large concurrent computers and equipment resources with large storage capacity to support it. However, its advantage lies in that it can well overcome the influence of sample distribution so that the experimental effect is very good and the generalization ability is very good. SVM is a shallow linear model to classify different data. If the low-dimensional data vector space cannot be classified, the mapping method can be used to find the best hyperplane.Logistic regression (LR): the LR model selects parameters according to the input variableZ and calculates the output variable, that is, hθz=py=1/z;θ is the possibility of 1. Here, the assumption of logistic regression model is shown in equation (1), and sigmoid function of type S is shown as follows:(1)hθz=11+e−θTZ,(2)gx=11+e−x.The logistic regression model ishθz=gθTz obtained from equations (1) and (2), where z is the eigenvector of the classification target.


## 3. Improved Text Data Mining Method Based on CNN and DBM

### 3.1. The Text Classification of CNN and DBM

CNN is a deep learning model characterized by weight sharing, which is an extension of BP neural network [9, 10]. CNN uses the gradient descent method to achieve weight adjustment. Its characteristic is that the direction of weight adjustment is toward the direction of the fastest gradient, which improves the network convergence speed. In terms of feature mapping, if the weights of neurons are consistent, the parallel learning of the network can be realized, which is a feature that CNN differs from neural network.DBM is the basic modeling unit of network, and it is a model structure composed of RBM with undirected graph connection. The schematic diagram of DBM can be seen in Figure1. It is mainly composed of unsupervised pretraining and supervised fine-tuning [11], which are roughly consistent with network results when selecting network nodes. DBM is able to efficiently combine local and global feature information [12]. It consists of a set of multiple visual units that make up its input layer (v). The hidden layer (h) consists of a number of hidden cells in sequence and finally the output layer, which constitutes the DBM model. Adjacent layers in the model are connected by undirected graphs.Figure 1
The schematic diagram of DBM.There are three main advantages of DBM. First, the weight can be updated through prior knowledge, which can extract features well. Second, the weight is updated by prior knowledge, which can effectively suppress input noise. The third is to simultaneously sample and calculate the weights of the neighboring nodes [13, 14]. This will give a more accurate text representation. DBM also has its own shortcomings, mainly in the expansion of the number of network layers, and the number of connected nodes increases; the computational complexity is exponential.


### 3.2. The Improved Text Classification Method

An improved text categorization method proposed in this paper is based on the improvements of CNN and DBM models. There are three steps to improve the CNN and DBM model components. The overall framework is shown in Figure2.Figure 2
Framework of CNN and DBM models.In order to improve the accuracy of CNN and DBM model classification, the third step of this model, namely, hierarchical classification, is improved.Figure3 is a detailed framework diagram of the improved model, and the middle part is the feature extraction layer. In this step, CNN model is adopted to realize local feature extraction yc and global featureye supplement for the input text representation. Then, DBM is used to fuse the two features and finally classify them.Figure 3
Framework for improved model.In this framework, the output of CNN is the extracted local text featureyc, and ye is the entity feature which is the global feature. The input dimensions of both are the same, and they constitute the input formula of the DBM model, which is expressed as follows:(3)V=11+eCyc+Eye.Then, each time a layer of hidden layer is passed, the corresponding weightwi is obtained. After model training, pretraining and fine-tuning, model testing, and finally the label of the target sample. In addition, in order to speed up the training speed of the model, ReLu activation function is adopted for training in this paper.


### 3.3. Hierarchical Classification

The output tag classification of DBM model is realized by designing label tree hierarchy (LTA). The LTA classifies the labels in a tree structure and renames the labels in a sequence of tree structures to form new labels. According to the characteristics of the experimental dataset adopted in this paper, all the labels are divided into two layers for layer processing. The first layer is a rough classification, which corresponds to the father node. The second layer is a fine classification, which corresponds to a leaf node.There will be some errors through this layering. The error is obtained by the difference between the model classification and the real classification. At the same time, it is fed back to the CNN network in the first step of the model. The model receives the feedback error and corrects it and adjusts the weight until accurate classification is achieved.


### 3.4. The Evaluation Index of Text Classification Performance

The evaluation index of text classification method is based on the prediction of text classification. In general, there are three categories of indicators, namely, basic indicators, macro- and microaverage indicators, and ROC curve indicators.The basic performance indicators of text classification include accuracy rateP, recall rate R, measure value F, and similarity S. The accuracy rate P is a measure of the precision of the retrieval system and is defined as follows:(4)P=related files retrieved by the systemtotal number of files retrieved by the system.The recall rateR is a measure of the entire document system and is defined as follows:(5)R=related files retrieved by the systemtotal number of related files in the system.Select the measure value F1 as the classification index and it is the weighted harmonic average of equations (2) and (3).(6)F1=2PRP+R.The similarityS is defined as(7)S=related files retrieved by the systemsystem retrieved files+related files not retrieved.The basic indicatorsP and R of classification performance are indicators that measure a certain category. The metrics for the entire dataset are macro and micro. The macroaverage reflects the overall performance of the algorithm, while the microaverage reflects the overall arithmetic performance of the algorithm. These performance indicators are expressed as follows”(8)Macro−P=∑K=1KPKK,Macro−R=∑K=1KRKK,Macro−F1=∑K=1KF1KK,Micro−R=∑K=1KAK∑K=1KAK+∑K=1KCK,Micro−F1=2∗MicroP∗MicroRMicroP+MicroR,where K represents the number of categories divided. It can be seen that the macroaverage has the characteristics of weight sharing, and the weight of each category is the same. The arithmetic mean of microaverage makes it more susceptible to large categories.The ROC curve is a comprehensive indicator of continuous variables of sensitivity and specificity. If the area formed by the indicator curve is larger, it reflects the higher accuracy of the algorithm.


## 3.1. The Text Classification of CNN and DBM

CNN is a deep learning model characterized by weight sharing, which is an extension of BP neural network [9, 10]. CNN uses the gradient descent method to achieve weight adjustment. Its characteristic is that the direction of weight adjustment is toward the direction of the fastest gradient, which improves the network convergence speed. In terms of feature mapping, if the weights of neurons are consistent, the parallel learning of the network can be realized, which is a feature that CNN differs from neural network.DBM is the basic modeling unit of network, and it is a model structure composed of RBM with undirected graph connection. The schematic diagram of DBM can be seen in Figure1. It is mainly composed of unsupervised pretraining and supervised fine-tuning [11], which are roughly consistent with network results when selecting network nodes. DBM is able to efficiently combine local and global feature information [12]. It consists of a set of multiple visual units that make up its input layer (v). The hidden layer (h) consists of a number of hidden cells in sequence and finally the output layer, which constitutes the DBM model. Adjacent layers in the model are connected by undirected graphs.Figure 1
The schematic diagram of DBM.There are three main advantages of DBM. First, the weight can be updated through prior knowledge, which can extract features well. Second, the weight is updated by prior knowledge, which can effectively suppress input noise. The third is to simultaneously sample and calculate the weights of the neighboring nodes [13, 14]. This will give a more accurate text representation. DBM also has its own shortcomings, mainly in the expansion of the number of network layers, and the number of connected nodes increases; the computational complexity is exponential.


## 3.2. The Improved Text Classification Method

An improved text categorization method proposed in this paper is based on the improvements of CNN and DBM models. There are three steps to improve the CNN and DBM model components. The overall framework is shown in Figure2.Figure 2
Framework of CNN and DBM models.In order to improve the accuracy of CNN and DBM model classification, the third step of this model, namely, hierarchical classification, is improved.Figure3 is a detailed framework diagram of the improved model, and the middle part is the feature extraction layer. In this step, CNN model is adopted to realize local feature extraction yc and global featureye supplement for the input text representation. Then, DBM is used to fuse the two features and finally classify them.Figure 3
Framework for improved model.In this framework, the output of CNN is the extracted local text featureyc, and ye is the entity feature which is the global feature. The input dimensions of both are the same, and they constitute the input formula of the DBM model, which is expressed as follows:(3)V=11+eCyc+Eye.Then, each time a layer of hidden layer is passed, the corresponding weightwi is obtained. After model training, pretraining and fine-tuning, model testing, and finally the label of the target sample. In addition, in order to speed up the training speed of the model, ReLu activation function is adopted for training in this paper.


## 3.3. Hierarchical Classification

The output tag classification of DBM model is realized by designing label tree hierarchy (LTA). The LTA classifies the labels in a tree structure and renames the labels in a sequence of tree structures to form new labels. According to the characteristics of the experimental dataset adopted in this paper, all the labels are divided into two layers for layer processing. The first layer is a rough classification, which corresponds to the father node. The second layer is a fine classification, which corresponds to a leaf node.There will be some errors through this layering. The error is obtained by the difference between the model classification and the real classification. At the same time, it is fed back to the CNN network in the first step of the model. The model receives the feedback error and corrects it and adjusts the weight until accurate classification is achieved.


## 3.4. The Evaluation Index of Text Classification Performance

The evaluation index of text classification method is based on the prediction of text classification. In general, there are three categories of indicators, namely, basic indicators, macro- and microaverage indicators, and ROC curve indicators.The basic performance indicators of text classification include accuracy rateP, recall rate R, measure value F, and similarity S. The accuracy rate P is a measure of the precision of the retrieval system and is defined as follows:(4)P=related files retrieved by the systemtotal number of files retrieved by the system.The recall rateR is a measure of the entire document system and is defined as follows:(5)R=related files retrieved by the systemtotal number of related files in the system.Select the measure value F1 as the classification index and it is the weighted harmonic average of equations (2) and (3).(6)F1=2PRP+R.The similarityS is defined as(7)S=related files retrieved by the systemsystem retrieved files+related files not retrieved.The basic indicatorsP and R of classification performance are indicators that measure a certain category. The metrics for the entire dataset are macro and micro. The macroaverage reflects the overall performance of the algorithm, while the microaverage reflects the overall arithmetic performance of the algorithm. These performance indicators are expressed as follows”(8)Macro−P=∑K=1KPKK,Macro−R=∑K=1KRKK,Macro−F1=∑K=1KF1KK,Micro−R=∑K=1KAK∑K=1KAK+∑K=1KCK,Micro−F1=2∗MicroP∗MicroRMicroP+MicroR,where K represents the number of categories divided. It can be seen that the macroaverage has the characteristics of weight sharing, and the weight of each category is the same. The arithmetic mean of microaverage makes it more susceptible to large categories.The ROC curve is a comprehensive indicator of continuous variables of sensitivity and specificity. If the area formed by the indicator curve is larger, it reflects the higher accuracy of the algorithm.


## 4. Experimental Results and Analysis

Dataset 1 used in this experiment is a performance comparison document on the medical dataset. The total number of samples is 9666, which is divided into 39 categories, and the corresponding types are multiclass. Dataset 2 is selected from the dataset. The total number of samples is 1000, which is divided into 168 categories. The corresponding types are multicategories. Dataset 3 is selected from the dataset. The total number of texts reaches 1000000, which is divided into 150 categories. The corresponding type is multilabel. These three kinds of experimental objects can better extend and verify the generalization ability of the model proposed in this section. Table1 is a comparison of several datasets.Table 1
Dataset information.
DatasetNumber of samplesNumber of categoriesTypeDataset 1966639MulticlassDataset 21000168Multi categoriesDataset 31000000150MultilabelIn the experimental subjects selected in this paper, the ratio of the training samples to the test samples of the subjects is 7 : 3. In addition, the sliding window step size of the CNN model is set to 50 to shift, so as to avoid changing the meaning of the representative word.The performance indicators of different features of dataset 1 are compared. The specific data indicators are shown in Tables2 and 3. From the data of different indicators, it can be concluded that the performance of the improved model proposed in this paper is better than that of other models regardless of BOW+ or DSE features. As far as the shallow model approach is concerned, the BOW+ has better performance than the DSE, while the DSE represents better performance for the model proposed in this paper and the improved CNN model.Table 2
Performance comparison of BOW+ features in dataset 1 (%).
PRFSPM21.7131.5525.8840.56LDA55.2254.6754.8552.16SVM57.4457.0657.2553.93NB53.2255.0154.0252.09LR54.0653.2253.9954.09MTI62.0763.0162.0757.01MU635961.9956.09CNNflat53.1153.6652.9952.22CNNH60.0158.9959.2255.99C−Bflat5452.3353.9951.89Proposed64.9763.264.1259.22Table 3
Performance comparison of DSE features in dataset 1 (%).
PRFSPM21.7731.5525.8840.56LDA50.9950.9850.9950.56SVM47.5547.6647.8848.09NB50.0150.9950.0651.01LR50.0146.0946.9948.01MTI52.0152.0651.7757.99MU50.0750.0950.6650.99CNNflat55.095253.0954.01CNNH63.9961.9962.3660C−Bflat58.3357.3358.9954.36Proposed68.9966.3367.6661Through experiments on different models and feature representation methods of dataset 2, Tables4 and 5 show that the performance of the improved model proposed in this paper is superior to other models under different feature representation methods. For the shallow model method, BOW+ has better performance than DSE, while DSE represents better performance for the model proposed in this paper and the improved CNN model.Table 4
Performance comparison of BOW+ features in dataset 2 (%).
PRFSPM25.1736.5130.1742.07LDA4746.334748.36SVM48.1449.2249.2249.33NB46.3346.2246.3648.39LR45.245.6945.3348.33MTI52.3351.7451.2251.01MU51.7752.8852.1151.85CNNflat46.3342.0444.247.2CNNH61.225960.3356.88C−Bflat55.2252.9953.5552.99Proposed64.9962.8963.8760.85Table 5
Performance comparison of DSE features in dataset 2 (%).
PRFSPM25.6636.1130.1742.08LDA40.2239.2239.3345.02SVM40.1240.8840.2245.99NB40.1240.8940.8745.96LR38.3335.2236.7440.22MTI42.142.0942.7746.22MU39.4439.2539.8855.44CNNflat48.7748.5548.5249.52CNNH66.9963.4465.2859.66C−Bflat59.7758.2458.9657.21Proposed71.2267.2269.0162.01For the analysis results in Tables2–5, more datasets can be obtained for the sample data. BOW+ and DSE feature representation is used to conduct performance comparison experiments for the 9 models, and the experimental results are shown in Tables 6 and 7.Table 6
Performance comparison of BOW+ features in dataset 3 (%).
PRFSLDA25.4936.8330.442.44SVM47.3246.6547.2348.73NB48.4649.5449.4549.7LR46.6546.5446.5948.76MTI45.5246.0145.5648.7MU52.6552.0651.4551.38CNNH52.0953.252.3452.22C−Bflat46.6542.3644.4347.57Proposed61.5459.3260.5657.25Table 7
Performance comparison of DSE features in dataset 3 (%).
PRFSLDA51.247.749.6349.87SVM48.148.348.9949.99NB45.343.244.1247.21LR52.149.250.1250.78MTI55.247.251.8550.21MU53.949.151.9650.21CNNH56.355.155.8553.21C−Bflat49.346.147.1449.12Proposed68.166.167.1461.77It can be concluded from the index data that the improved model proposed in this paper has better performance than other models.ROC performance experiments were conducted on three datasets. ROC curves of five models on three medical abstract datasets are shown in Figures4–6. The abscissa is specificity and the ordinate is sensitivity. The closer the curve is to the upper left, the better the performance. It is not difficult to see from the figure that the improved method has the best performance on medical, BioTex and Medline datasets.Figure 4
ROC curves on dataset 1.Figure 5
ROC curves on dataset 2.Figure 6
ROC curves on dataset 3.Figures4–6 show ROC performance comparison of different models on SVM, LDA, CNN_H, C-B_FLAT, and the improved method dataset. We can draw a conclusion from the pictures. Firstly, deep learning models are better than shallow learning methods. Secondly, hierarchical classification is better than flat classification. Thirdly, the improved model proposed in this paper can have optimal performance for different datasets.


## 5. Conclusion

According to the characteristics of special text, the existing special data mining method of text classification using simple machine learning model has poor performance. In order to solve this problem, a new improved data mining method based on CNN model and DBM model is proposed. This method combines CNN and DBM models with good feature extraction to achieve dual feature extraction. It can realize the reclassification of tags by constructing the tag level of tree structure and designing an effective hierarchical network. The model can suppress the influence of input noise on classification. The experimental results show that the improved model has good effect on the special domain text. The classification is a part of mining, and further information mining will be analyzed in the next research.



---

*Source: 2150488-2021-11-20.xml*