Internet of Things (IoT) applications are now used more frequently due to the rapid expansion of wireless networking and the digital revolution. IoT helps in user-to-machine and machine-to-machine interaction. IoT objects have gained popularity because they can be accessed from anywhere. Healthcare, agriculture, smart cities, and the military are different domains where IoT objects are communicating with each other. The goal of anomaly-based techniques is to figure out which patterns are normal and which are aberrant. This approach of intrusion detection has the benefit of detecting original works of authorship intrusions. However, this technique has the drawback of frequently producing false positive results. To increase the effectiveness of anomaly-based intrusion detection methods, machine learning techniques are being evaluated. Anomaly-based intrusion detection techniques can be used by machine learning algorithms to watch active behavior and compare it to known intrusion footprints in order to stay aware of potential future attacks. In a hybrid approach, different identifying methods are combined in the same scheme. This technique will eliminate the weaknesses of a particular operation while improving the overall IoT system's reliability. In this research, we study intrusion-based systems using comparative analysis of several machine learning and deep learning algorithms. In the proposed work one hot encoding technique is used to deal with the categorical data. Different parameters like accuracy, F-1 score, precision, and recall value have been calculated. Experimental results prove that ANN yields 99.61% accuracy over other hybrid models. However, in Machine Learning, RandomForestClassifier yields the best results.