Wireless sensor networks (WSNs) contain many sensor nodes, and this network is used for many applications such as military, medical, and others. Accurate data aggregation and routing are critical in hostile environments, where sensors' energy consumption must be carefully monitored. There is, nevertheless, a substantial probability of duplicate data due to ambient circumstances and shortdistance sensors. Large datasets include a variety of information, some of which is useful, while others are completely superfluous. This redundancy degrades performance in terms of computing cost and redundant transmission. Data aggregation, on the other hand, may eliminate redundant data in a network. In this paper new method called Kalman filter with Support vector machine (KF-SVM) is introduced to classify and data aggregate and get rid of noise in WSNs, which enhances network efficiency and extends its lifetime. Povzetek: V prispevku je opisana izvirna metoda za agregiranje podatkov v senzorskih omrežjih, ki dela na osnovi Kalmanovega filtra in SVM.