## 2 Methodology
### Classification of GDSW Based on Machine Learning  
#### 2.4.1 Classification Algorithm  
Identifying GDSW can be transformed into a dichotomous classification problem in essence. Currently, many different classification methods have been proposed in the literature based on different data models and data technologies. It is commonly acknowledged that no method can outperform the others in all cases. However, given a specific classification problem, it is empirically possible to determine which methods usually provide the best performance for that class of problem. In this study, we performed different classifiers using a very good machine learning package at present called the scikit-learn library [44]. For the classification of GDSW, we tested several classifiers preliminarily, and obtained preliminary results in the following classifiers:  
1. Support Vector Machines (SVM);
2. K-Nearest Neighbor (KNN);
3. Random Forests (RF);
4. Logistic Regression (LR). ```
1:\(\mathbf{U}\)\(\mathbf{\text{IR}}_{S}\): A series of URLs based on keywords crawled by Baidu search engine. 2:\(\mathbf{w}\): Text that represents the website. 3:\(\mathbf{w}\)\(\mathbf{head}\): The text in the <head></head> tag in the HTML document of the website, the text has been processed by word segmentation, stop words removal, theme word extraction (TF-IDF algorithm extraction), etc. See Sections 3.1 and 3.2 for details. 4:\(\mathbf{w}\)\(\mathbf{head}\) : The vector representation of \(\mathbf{w}\)\(\mathbf{head}\). 5:\(\mathbf{w}\)\(\mathbf{body}\) : The preprocessing method is the same as \(\mathbf{w}\)\(\mathbf{head}\), but for text in the < body></body> tag. 6:\(\mathbf{w}\)\(\mathbf{body}\): The vector representation of \(\mathbf{w}\)\(\mathbf{body}\). 7:\(\mathbf{un}_{\mathbf{u}}\) : Customized domain name libraries uncorrelated to GDSW. 8:\(\mathbf{T}\) : Website feature semantics. 9:\(\mathbf{time}\) : The vector representation of website feature semantics. 10:\(\mathbf{C}\), \(\mathbf{M}\), \(\mathbf{S}\): Semantic information composed of GDCO, GDMO, and GDSO, respectively. 11:\(\mathbf{c}\)\(\mathbf{c



distance, Manhattan distance, Markov distance, etc. The KNN algorithm is easy to use and insensitive to outliers. However, KNN is a lazy algorithm, which is easy to build models with, but is costly in the system of classifying test data [47]. RF refers to a classifier that uses multiple trees to train and predict samples. It is an ensemble learning method where the goal is to create a decision tree to predict the value of target variables according to the combination of input variables. Each internal node is associated with a decision related to the value of the input variable, which can best segment the training set. Different algorithms can be used to determine the input variables associated with internal nodes; see also [48]. The global output is obtained by calculating the output mode of each tree, and more details can be found in [49; 50]. RF is generally robust, can achieve better performance than a single decision tree, and can be extended to deal with very large datasets (for example, see [51]). The number of trees used in the experiment is set to 300. LR is a regression model in which the target variables are classified. Therefore, it can be used for classification. It measures the relationship between the target variable and one or more independent variables by estimating the probability with a logical function, that is, a cumulative logical distribution; see also [52]. LR can be regarded as a special case of the generalized linear model, so it is similar to a linear regression. This method is often used in practice because it has less computation and considerable generalization ability. When using a supervised classification method in machine learning, we need to label the sample data before implementation. If the website provides geospatial data, we labelled it as positive; otherwise, we labelled it as negative. Then, we divided the sample data into the training set and test set according to a certain proportion.