In order to enhance the accuracy and efficiency of coal and gas outburst disaster risk prediction, a novel approach combining kernel principal component analysis (KPCA) with an improved whale optimization algorithm (IWOA) optimized extreme learning machine (ELM) is proposed for precise forecasting of coal and gas outburst disasters in mines. Firstly, based on the influencing factors of coal and gas outburst disasters, nine coupling indexes are selected, including gas pressure, geological structure, initial velocity of gas emission, and coal structure type. The correlation between each index was analyzed using the Pearson correlation coefficient matrix in SPSS 27 software, followed by extraction of the principal components of the original data through kernel principal component analysis (KPCA). The whale optimization algorithm (WOA) was enhanced by incorporating adaptive weight, variable helix position update, and optimal neighborhood disturbance to augment its performance. The improved Whale Optimization Algorithm (IWOA) is subsequently employed to optimize the weight ф of the Extreme Learning Machine (ELM) input layer and the threshold g of the hidden layer, thereby enhancing its predictive accuracy and mitigating to some extent the issue of "over-fitting" associated with ELM. The principal components extracted by KPCA were utilized as input, while the outburst risk grade served as output. Subsequently, a comparative analysis was conducted between these results and those obtained from WOA-SVC, PSO-BPNN, and SSA-RF models. The IWOA-ELM model accurately predicts the risk grade of coal and gas outburst disasters, with results consistent with actual situations. Compared to other models tested, the model's performance showed an increase in Ac by 0.2, 0.3, and 0.2 respectively; P increased by 0.15, 0.2167, and 0.1333 respectively; R increased by 0.25, 0.3, and 0.2333 respectively; F1-Score increased by 0.2031, 0.2607, and 0.1864 respectively; Kappa coefficient k increased by 0.3226, 0.4762 and 0.3175, respectively. The practicality and stability of the IWOA-ELM model were verified through its application in a Shanxi Province coal mine where predicted values matched actual values exactly. This indicates that this model is more suitable for predicting coal and gas outburst disaster risks.