# A Distinctive Explainable Machine Learning Framework for Detection of Polycystic Ovary Syndrome
## 4 Results
### Model Evaluation with Machine Learning  
This research evaluates and analyzed 12 individual machine learning models: LR, DT, RF, SVM (Kernels- linear, polynomial, gaussian, and sigmoidal), NB, KNN, AdaBoost, XGBoost, and Extratrees. GridSearchCV provided an optimal selection of classifier hyperparameters. Figure 2 depicts the architecture of the model. After an exhaustive search, examining every possible combination of parameters, this tuning method predicted the optimal hyperparameter, as shown in Table 4.  
We took an ensemble learning approach to build a unique and superior model to screen PCOS. The stacking algorithm intends to learn the best combination of the outputs from multiple weak meta-learners for creating the best-performing model. Exploiting this principle, we built three stacks. STACK-1 aggregated seven classifiers: LR, SVM (with linear, polynomial, gaussian, and sigmoidal kernels), NB, and KNN models. STACK-2 represented a tree-based classifier ensemble consisting of DT, RF, AdaBoost, XGBoost, and Extratrees. The multi-level stack of STACK-1 and STACK-2 created STACK-3. Figure 3 pictorially represents the creation of our unique ensemble model.  
Figure 1: Features ranked from most significant to least significant by Mutual Information Algorithm.  
A combination of various feature selection techniques, data-split ratios, and meta-learners was considered, the results of which can be seen in Table 5. The recall metric gives insights into the False Negatives of the classifiers. The following were the pipelines producing the best recall: HHO-trained classifiers RF had a 95% score, SSA pipeline with XGBoost gave 97%, and MI with STACK-1 framework had a sensitivity of 100%. Among all architectures, classifiers trained on Mutual information and 80:20 data split had the highest metric scores. Table 6 presents the performance metrics representing models trained on Mutual Information data. It was observed that STACK-3 was either superior or comparable to the individual meta-learners. However, the results for STACK-3 varied with different feature selection techniques. Figure 4 represents the AUC-ROC and PR curves comparison  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Machine Learning Classifier** & **Best Parameter Specifications** \\ \hline Logistic Regression & \{C’: 0.1, ‘penalty’: ‘l2’\} \\ \hline Decision Tree & \{criterion’: ‘gini’, ‘max\_depth’: 50, ‘max\_features’: ‘sqrt’, ‘min\_samples\_leaf’: 1, \\  & ‘min\_samples\_split’: 30, ‘split’: ‘best’\} \\ \hline Random Forest & \{bootstrap’: True, ‘max\_depth’: 80, ‘max\_features’: 2, ‘min\_samples\_leaf’: 3, \\  & ‘min\_samples\_split’: 10, ‘n\_estimators’: 100\} \\ \hline Support Vector Machine- linear kernel & \{decision\_function\_shape = ovo, gamma = auto, kernel = linear\} \\ \hline SVM-Polynomial kernel & \{kernel = poly, max\_iter = 200\} \\ \hline SVM-Gaussian kernel & \{kernel = rbf, max\_iter = 200\} \\ \hline SVM-Sigmoidal kernel & \{kernel = sigmoid, max\_iter = 1800\} \\ \hline Naive bayes & \{var\_smoothing’: 8\} \\ \hline K-Nearest Neighbors & \{n\_neighbors’: 3\} \\ \hline AdaBoost & \{learning\_rate’: 0.1, _n\_estimators’: 1000\} \\ \hline XGBoost & \{colsample\_bytree’: 0.3, ‘gamma’: 0.1, ‘learning\_rate’: 0.05, ‘max\_depth’: 5, \\  & ‘min\_child\_weight’: 1\} \\ \hline Extratrees & \{‘min\_samples\_leaf’: 30, ‘min\_samples\_split’: 35, ‘n\_estimators’: 50\} \\ \hline \hline \end{tabular}
\end{table}
Table 4: Description of the best selected parameters for Machine learning sub-classifiers.  
Figure 2: Architecture of the proposed model.