# A Multi-Model Approach for User Portrait
## 4 Experiment and Analysis  
### Dataset and Experiment Setup  
**Dataset. ** The dataset used in the experiment was derived from the \"Search Dog User Portrait Mining in Big Data Precision Marketing\" provided by the Chinese Computer Federation (CCF) in 2016. It contained query terms that last for one month as well as user's population attribute labels, such as gender, age, and education, as the training data. Participants were required to construct classification algorithms through machine learning and data mining techniques to determine the population attributes of new users. That is, each record in the test.csv file was judged by age, gender, and educational background. The training dataset contained 100,000 data items, and so did the test dataset. The description of all data fields is provided in Table 1.  
**Word segmentation. ** Since there are no spaces between words in Chinese sentences, it was necessary to divide the sentences into words before text categorization could be performed. Through the analysis of the sample data, we found that \"space,\" \"punctuation,\" and many stop words were helpful to distinguish between the basic attributes of users. \begin{table}
\begin{tabular}{c c} \hline \hline
**Field** & **Instructions** \\ \hline ID & Encrypted ID \\ Age & 0:Unknown age; 1:0–18 years old; 2:19–23 years old; 3:24–30 years old; 4:31–40 years old; 5:41–50 years old; 6:51–99 years old \\ Gender & 0: unknown; 1: male; 2: female \\ Education & 0: unknown education; 1: doctor; 2: master; 3: college student 4: high \\  & school; 5: high school; 6: primary school \\ Query & Search word list, such as 100 piano music appreciation, baby’s right eye \\ List & Droppings, convulsions, cesarean section knife edge on the thread \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Description of the data fields. Therefore, in this experiment, the blanks, the punctuations, and the stop words were not processed in word segmentation through TF-IDF feature calculation. The text in the datasets was mainly the users' search records with short length. It was of great importance to perform word segmentation efficiently. Through extensive application and comparison, three word segmentation methods, i.e., JIEBA, THULC, and Ngram, were tried. Eventually, JIEBA was selected to perform word segmentation. **Text representation. ** Text information is unstructured data, so it is necessary to use a mathematical model to express text data in a form that can be processed by the computer. In our work, the vector space model was used to represent texts. The idea of the model is to map text \(d_{i}\) to a feature vector \(V(d_{i})\), where \(V(d_{i})=(\{t_{i1},w_{i1}\},\)\((t_{i2},w_{i2}),\)\(\ldots,\)\((t_{in}w_{in}))\) and \(t_{ik}\) is the \(k\)th characteristic item of document \(d_{i}\), and \(w_{ik}\) is the weight corresponding to the \(k\)th characteristic item. In our work, two text representation methods were used, with the first one being the TF-IDF text representation and the second one being the neural network text representation. The main idea of the TF-IDF model is that if a word appears frequently in one document and rarely in others, the word is considered to have a good ability of separating the document from the others. However, the disadvantage of this method is that such items should be given a higher weight to distinguish one document from other documents. In the study, conditional probability was introduced when characteristic items were introduced. The improved TF-IDF weight calculation formula is expressed in Formula (12).