Machine Learning Analysis Reports — RSV Laboratory Advanced AST Analysis Tool (rsv_4.4_skd)
Authors:Das, Kamol — University of Chittagong (Microbiology)ORCID: 0009-0004-2253-7527GitHub: github.com/KamolDas/AST-Tool Dataset: 1,297 clinical isolates (guidance-informed demonstration panel; resistance percentages reflect panel composition, not measured clinical prevalence). 1. Random Forest Classifier: Resistance Phenotype Prediction A Random Forest classifier was trained to predict antimicrobial resistance phenotype (Susceptible, Intermediate, Resistant) from four input features: minimum inhibitory concentration (MIC), zone diameter, pathogen species, and antibiotic identity. On the held-out test set, the model achieved 97.43% overall accuracy and a macro-averaged F1-score of 0.8305; the gap between these two metrics is consistent with class imbalance across the S/I/R categories rather than model instability, since macro-F1 weights minority classes equally while accuracy does not. Feature importance analysis identified zone diameter (importance = 0.4194) and MIC (0.3621) as the dominant predictors, together accounting for substantially more predictive weight than pathogen or antibiotic encoding. A Matthews Correlation Coefficient of 0.9406 further supports strong agreement between predicted and observed classifications across all three phenotype categories. 2. K-Means Clustering: Pathogen-Based Segmentation K-Means clustering was applied to AST profiles across 13 pathogen species to test for natural groupings independent of species labels. The optimal cluster count, selected via [cluster-selection method — specify before submitting], was k = 2, partitioning the 1,297 isolates into clusters of 1,007 and 290 samples. The resulting silhouette score of 0.3563 indicates moderate cluster separation, suggesting overlapping AST profiles between several pathogen groups and a need for additional dimensionality reduction to resolve species-level clusters more precisely. 3. t-SNE Visualization: Antibiotic Relationship Mapping t-Distributed Stochastic Neighbor Embedding (perplexity = 30) was used to project AST metadata for 49 unique antibiotics into two dimensions, yielding embedding variances of 412.63 (x-axis) and 491.64 (y-axis). The resulting map provides a qualitative view of how antimicrobial agents group by efficacy pattern across the cohort, offering exploratory signal on potential cross-resistance and therapeutic overlap. 4. t-SNE Visualization: Pathogen Distribution Patterns A second t-SNE embedding was generated for the 13 pathogen species present in the dataset, producing embedding variances of 415.23 (x-axis) and 492.84 (y-axis). The projection highlights species such as Escherichia coli and Klebsiella pneumoniae forming visually distinct regions based on susceptibility profile, supporting exploratory identification of species-specific resistance trends. 5. ROC Analysis: Diagnostic Predictive Value Receiver Operating Characteristic analysis was performed on the resistance-prediction model's class probabilities. The model achieved a macro-averaged AUC of 0.9936, with class-specific AUCs of 0.9991 (Susceptible), 0.9980 (Resistant), and 0.9833 (Intermediate). The Intermediate class shows the lowest, though still strong, discriminatory performance — consistent with intermediate phenotypes sitting closest to classification boundaries in AST data. 6. Principal Component Analysis: Variance Explained PCA was applied to the four core features (MIC, zone diameter, pathogen, antibiotic) across all 1,297 samples for dimensionality assessment. The first three principal components jointly explained 90.17% of total variance (PC1 = 41.82%, PC2 = 26.58%, PC3 = 21.77%), indicating that the selected four-feature representation captures the dominant structure of the AST dataset efficiently.