In this digital world, large volume of data is transmitted across various sectors like production industry, healthcare, IoT devices, sales, and other organizations. In this paper, an Elephant Herd Principal Component Optimization (EHPCO) technique is used as a feature selection model to analyse the features of the data that are collected from the IoT devices. The improved perturbation technique is used the privacy preserving of data streams from the IoT devices. The machine learning classifiers are used to analyse its performance based on the proposed feature selection technique. Experimental results show that the proposed HPCO technique outperforms to improve the performance of the machine learning classifiers in terms of TPR, FPR, and accuracy. The DBN classifier obtains more than 86% of accuracy when compared with other algorithms like SVM, MLP, DT, and RF. When the certain features are extracted using the proposed EHPCO technique, the performance of the classifier is improved much in terms of accuracy. The analysis is made for four datasets such as, HPMD, FRDD, EZSD, and SSTD.