## 4 Results
### Application Controllable Fractional-Order Particle Swarm Algorithm
#### 4.3.1 Custom Fitness  
Accuracy is used to evaluate the accuracy of model predictions and is a basis for assessing the overall credibility of the model. \(F_{\beta score}\) evaluates and weighs false positives and false negatives through precision and recall. Among them, when \(\beta>1\), recall is \(\beta\) times more important than precision. As the model is applied in the medical field, the false-negative component is more important than the false positive, so this study set \(\beta\) to 2. The formula is as follows:  
\[Accuracy=\frac{TP+TN}{TP+TN+FP+FN} \tag{28}\]  
\[F_{\beta score}=\frac{1}{\frac{1}{1+\beta}\cdot\frac{1}{Precision}+\frac{\beta} {1+\beta}\cdot\frac{1}{Recall}}=\frac{(1+\beta)\cdot Precision\cdot Recall}{( \beta\cdot precision)+Recall} \tag{29}\]  
where \(Precision=\frac{TP}{TP+FP}\) and \(Recall=\frac{TP}{TP+FN}\). \(TP\) denotes true positive; \(TN\) represents true negative; \(FP\) denotes false positive; \(FN\) represents false negative.  
This study focuses on the accuracy and \(F_{\beta score}\) of the validation set but also on the accuracy and \(F_{\beta score}\) of the training set. To prevent the model from learning the model hyperparameters that happen to be performed better when evaluated on the validation set, the custom fitness is set using the following equation:  
\[Acc=0.5\cdot(Train_{Acc}+Val_{Acc}) \tag{30}\]  
\[F_{\beta score}=0.5\cdot\left(Train_{F_{\beta score}}+Val_{F_{\beta score}}\right) \tag{31}\]  
\[CustomFitness=\frac{1}{0.5\cdot\left(Acc+F_{\beta score}\right)}-1 \tag{32}\]  
Custom fitness is within the range \(\begin{bmatrix}0&\infty\end{bmatrix}\). The smaller the value, the better. The execution steps of the experiment are as follows:  
Step 1: Load the heart disease data set;  
Step 2: Adjust the data set for preprocessing, such as standardization and one-hot encoding to a type that the machine learning model can learn. Use derivative features such as \(K\)-means and PCA's two-dimensional coordinates as new features for model learning;  
Step 3: Divide the data set into three parts: 70% training data set, 15% validation data set, and 15% test data set;  
Step 4: Initialize the controllable fractional-order particle swarm optimizer (CFPSO) position and use it as the initial input of the model hyperparameters;  
Step 5: Use the training set to train the machine learning model according to the hyperparameter settings and evaluate the accuracy and \(F_{\beta score}\) of the model training set and validation set to integrate into a custom objective function (custom fitness);  
Step 6: Update the controllable fractional-order particle swarm algorithm's own best solution and global best solution according to the minimum value of the self-defined objective function;  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Hyper Parameters** & **Official Recommended Value** & **Search Region** \\ \hline Learning Rate & 0.3 & \([0.1\) & \(0.5]\) \\ Max\_depth & 6 & \([3\) & \(9]\) \\ Gamma & 0 & \([0.01\) & \(0.2]\) \\ Subsample & 1 & \([0.5\) & \(1]\) \\ Colsample\_bytes & 1 & \([0.5\) & \(1]\) \\ Reg\_lambda & 0 & \([0.1\) & \(5]\) \\ \hline \hline \end{tabular}
\end{table}
Table 3: Hyperparameters of XGBoost.  
Step 7: Repeat Steps 5 and 6 until the stop condition is met;  
Step 8: Use the global best solution as the model's best hyperparameters to train the model and use the test set as the final evaluation result.