Abstract
Using feature weighting based on Jensen-Shannon divergence and inverse category frequency (ICF), this research introduces JINB, an improved Naive Bayes (NB) classifier, so that network intrusion detection can be more precise. The technique uses the JINB algorithm for network event classification after feature weights are determined according to their situational importance. By utilising the NSL-KDD dataset, we were able to validate the algorithm's performance, which showed considerable enhancements in detection accuracy, decreased false alarm rates, and efficient real-time processing. When compared experimentally to other algorithms, like OAA, SVM, IBT, HNB, and XLSTM, JINB proves to be the most effective in identifying different forms of attacks in WSNs without sacrificing energy economy. The findings show that JINB is an efficient, accurate, and cost-effective way to identify intrusions in networks in real-time.