• No results found

Chapter 6 Results and Discussion

6.2 Single Machine Learning Classifiers Results for Classification

6.2.2 K-Nearest Neighbours Algorithm (KNN)

The principal aims of using several classifiers in comparison with the baseline models is to estimate and evaluate each classifier that is able to perform the best. Each class is labelled to the specific amount of medication. The decision represents a trade-off, since our data sample was limited to about 1896 examples, thus excluding the possibility of a realistic division for more than 9 classes. The simulation classification results using k-Nearest Neighbours Algorithm (KNN) indicated that the proposed model produced slight improvements using the performance evaluation techniques metrics. The model performed well during the training stage and provided such robust results after selecting a random subset for testing process as seen in Table 6.3. KNN generates better results in comparison to the baseline classifiers as illustrated in section 6.4. The AUC figures for both training and testing sets illustrated that the proposed KNN achieved high accuracy in the majority of classes compared to ROM and LNN.

Cla ss if ie r ac cu ra cy

114 | P a g e The results obtained from the experiments show that the KNN/1 classifier using 1 K- nearest neighbour outperformed all other classifiers with AUC 0.99956 and 0.99911 in terms of accuracy. This model was able to obtain 1 in sensitivity and 0.999 during specificity process. As illustrated in Table 6.3 and figure 6.7, this model extensively outperformed the baseline models LNN and ROM, by a significant margin. The classifier achieves an ideal fit over the training set for all operating points, as can be illustrated in Table 6.3, the ROC and AUC plots shown in Figures 6.5 and 6.7, respectively. Moreover, the performance obtained during the training of these two classifiers is shown to provide excellent generalisation to the test set, with AUCs ranging between 0.99 with 1 k and 0.715333 with 100 k also shown in Figure 6.6. The strong generalisation of this classifier indicates that there exists rich information content embedded within our selected data source, showing a high upper bound on classification performance. This research conducted further experiments using SVM classifier in the following section, showing that this class of model is significantly less capable for classifying our dataset.

Table 6-3: KNN per number of K performance with an average of 9 classes (Train)

Model Sensitivity Specificity Precision F1 J Accuracy AUC

KNN/1 1 0.999 0.98911 0.99422 0.999 0.99911 0.99956 KNN/5 0.91911 0.83956 0.37622 0.51867 0.75878 0.84544 0.91944 KNN/10 0.84389 0.76267 0.27333 0.39656 0.60656 0.77144 0.87156 KNN/20 0.81544 0.70989 0.22743 0.33667 0.52544 0.71856 0.82267 KNN/50 0.70078 0.67967 0.18903 0.276 0.38056 0.67856 0.75322 KNN/100 0.659556 0.656111 0.173856 0.257456 0.316 0.657556 0.715333

115 | P a g e

Figure 6-5: ROC curve (Training) for KNN classifier per number of K

This classifier is a variant of the artificial neural network where the outcome of new sample query is classified depending on the majority of KNN category [245]. Further experiments show that the chosen dataset exhibits significant results during the training set; the objective of this model is to classify a new object without class label to check model performance and compare results between testing samples and training samples. In order to estimate the classification performance, this model uses the majority voting for this purpose. It utilises neighbourhood classification to predict a new instance, which k is a positive integer. To achieve that, this model used minimum distance from the new sample to the training samples. It is pointed by taking the majority vote of its neighbours, If K = 1, then the case is simply assigned to the class of its nearest neighbour. The neighbours are selected from the training samples set where the class label is known.

116 | P a g e

Figure 6-6: The accuracy and AUC of KNN (train and test)

Figure 6-7: AUC (Train) for KNN classifier per number of K

This model present a new technique to use different numbers of k to check the performance metrics during the testing process. This research used K-nearest neighbours with 1 k-nearest neighbour, 5 k-nearest neighbour, 10 k-nearest neighbour, 50 k-nearest neighbour, and 100 k- nearest neighbour. During the investigation procedure, it found the KNN with 1 K produced the best results among other approaches. This result was expected as it used only one K. For

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 KNN/1 KNN/5 KNN/10 KNN/20 KNN/50 KNN/100 Fre qu ncy Classifer Per K

The Accuracy and AUC of KNN

Accuracy/Traning Accuracy/Testing AUC/Traning AUC/Testing

C la ss if ie r ac cu ra cy

117 | P a g e validating results, it used more than one k with 1896 instances of our datasets including 9 classes to evaluate the model performance with 6 techniques as illustrated in Table 6.4 and Figure 6.8. This study introduce the multi-class label classification problem in order to obtain training and testing methods for each model along with other performance evaluation. In machine learning, the model utilises a training set in association with building a classifier that provides a reliable classification. This research discusses different aspects of machine learning approaches for the classification of biomedical data. The results obtained from a range of models during our experiments have shown that the proposed combination of k classifiers outperformed other classifiers.

Table 6-4: KNN classifiers performance with an average of 9 classes (Testing)

Model Sensitivity Specificity Precision F1 J Accuracy AUC KNN/1 0.716 0.67756 0.19461 0.27989 0.3936 0.678 0.71389 KNN/5 0.51878 0.79778 0.22972 0.30967 0.31639 0.77444 0.67011 KNN/10 0.65344 0.71133 0.20359 0.29222 0.36478 0.70833 0.69133 KNN/20 0.725 0.61911 0.17667 0.25889 0.34411 0.62522 0.69833 KNN/50 0.63333 0.633 0.16078 0.24092 0.26656 0.64267 0.64456 KNN/100 0.656333 0.599111 0.157644 0.236422 0.255333 0.609889 0.629778

The AUCs obtained for the KNN model during training are ranged between 0.71389 and 0.629778 for average of 9 classes, in comparison to 0.678, 0.913, and 0.609889 over the test sample for accuracy measurement. The model results were poor in comparison with the RFC due the KNN performing badly with multi- classes and performing well with two classes. In Figure 6.9 for the AUC curve, it is pointed out that KNN with 1 k outperformed other approaches with 9 classes at the true positive rate. Based on experiments using 9 classes, this classifier has fastest learning time with fastest running time, but the performance classification evaluation metrics didn’t perform well in the clinical datasets. It is very important to obtain high performance and accuracy within healthcare provider domains because of dealing with patients’ condition.

118 | P a g e

Figure 6-8: ROC curve (Test) for KNN classifier per number of K

Figure 6-9: AUC (Test) for KNN classifier per number of K

In the SCD datasets, this model increased the F-measure with the range between 0.24092 and 0.30967 of original attributes. In specific 13 attributes of the SCD dataset, Positive Predictive Value (PPV) is another way for statistical analysis, which has significantly increased the precision from 0.157644 at KNN/100 to 0.22972 with KNN/5. J1-score is a single statistic that is able to calculate the probability of multiclass case at an informed decision. More specifically, Youden's statistical technique is utilised to measure the ROC curve. This technique was able to obtain between 0.255333 and 0.36478. Unfortunately, all 6 KNN classifiers were unable to improve the performance metric methods (slightly dropped from 0.99 during the training phase to 0.71389 within the testing process.

C la ss if ie r ac cu ra cy

119 | P a g e