Linear regression (LR) multiplies each feature or attribute of the training sample set by a parameter, and adds the results as the output of the results. It is expressed as:
$$\text{h}\left(\text{x}\right)={\text{w}}^{\text{T}}\text{x}$$
1
Logical regression is to put the sum obtained from linear regression into the sigmoid function and get the decimal between (0, 1). If the value is greater than the specified threshold, it is considered as a positive class, and if it is less than the threshold, it is considered as a negative class, namely:
$$\text{g}\left(\text{z}\right)=\frac{1}{1+{\text{e}}^{-\text{w}\text{x}}}$$
2
Suppose there are n training samples, the probability of each sample occurrence corresponds to the Bernoulli distribution, and p (yi = 1/x) represents the probability of a positive class, then the probability of a negative class is 1-p (yi = 1/x), expand it to solve it, and take the derivative of w:
$$\frac{\partial \text{l}\left(\text{w}\right)}{\partial \text{w}}=\sum _{\text{i}=1}^{\text{m}} \left({\text{y}}_{\text{i}}-\text{g}\left(\text{z}\right)\right){\text{x}}_{\text{i}}$$
3
The support and confidence formula is described as follows:
$$\text{support }(\text{C}\Rightarrow \text{D})=\left|\text{C}\text{U}\text{D}\right|/\left|\text{E}\right|$$
4
$$\text{confidence }(\text{C}\Rightarrow \text{D})=\left|\text{C}\text{U}\text{D}\right|/\text{C}\mid$$
5
Set thresholds for support and confidence. Strong rules are rules that meet support and confidence criteria. The association rule analysis process can be briefly described as follows:
$$\text{e}\text{n}\text{t}\text{r}\text{o}\text{p}\text{y}\left(\text{A}\right)=-\sum _{\text{i}=0}^{\text{m}} {\text{p}}_{\text{i}}{\text{l}\text{o}\text{g}}_{2}{\text{p}}_{\text{i}}$$
6
If attribute E divides training dataset A into n pieces, Ai is the ith subset of the training dataset, and | A | and | Ai | are the number of training dataset A and its subset Ai, and then divide these subsets. Subset entropy, the expected value formula can be expressed as:
$$\text{e}\text{n}\text{t}\text{r}\text{o}\text{p}\text{y}(\text{A},\text{E})=\sum _{\text{i}=0}^{\text{m}} \frac{\left|\text{A}\text{i}\right|}{\left|\text{A}\right|}\text{ entropy }\left({\text{A}}_{\text{i}}\right)$$
7
Then the training data set A and attribute E are divided, and the information obtained by the entropy reduction value is the difference between the undivided entropy value and the segmented entropy value, gain (A, E) = entropy (A) - entropy (A, E). The higher the information obtained, the more classification information provided by the selected partition attribute, because entropy is a measure of data diversity. If less information is obtained, it indicates that the classification attribute lacks diversity. The classification information provided by this attribute is very little and has no value as a classification attribute.
Figure 1 shows the difference in execution time between the optimized approximate association analysis algorithm and the classic Apriori association analysis algorithm when setting the minimum support and the number of transaction records in the database. It can be seen from the figure that when the transaction record is large enough, the efficiency of the optimization algorithm is higher than that of the classic Apriori algorithm, which shows the efficiency and availability of the algorithm.
Through clustering experiments on two datasets, the number of iterations and convergence results are shown in Fig. 2. After comparing the results of different clustering algorithms, it is found that the F-measure value of standard differential evolution algorithm and improved differential evolution algorithm is higher than that of K-means algorithm, whether it is Iris dataset or Wine dataset. It can be proved that K-means algorithm is a relatively poor algorithm and its precision is lower than the first two algorithms.
The fitness function is shown in Table 1.
Table 1
Comparison of fitness functions of different algorithms on two datasets
Data set | Iris | | | Wine | | |
Condition | mean value | Worst value | optimal value | mean value | Worst value | optimal value |
GA | 126.44 | 141.18 | 115.12 | 16695.84 | 16695.84 | 16695.84 |
TS | 98.84 | 99.56 | 98.33 | 16953.31 | 17005.92 | 16832.88 |
SA | 98.10 | 98.23 | 98.07 | 16695.84 | 16695.84 | 16695.84 |
ACO | 98.14 | 98.79 | 98.07 | 16695.84 | 16695.84 | 16695.84 |
DECluster | 97.62 | 97.62 | 97.62 | 16455.14 | 16455.14 | 16455.14 |
IDECluster | 97.62 | 97.62 | 97.62 | 16455.11 | 16455.11 | 16455.11 |