## 3 Proposed System  
With the rapid development of communication and computing technologies along with more extraordinary computing abilities and power communications, the potential of the IoT in the medical fields should be taken into consideration, which is why it is now named the Internet of Medical Things (IoMT). IoMT includes the related infrastructure of many medical instruments and various related pieces of software to communicate and share healthcare data with different healthcare information systems. By using several smart sensors, especially wearable sensors, medical staff and medical professionals can acquire, gather, and save real-time health data related to their patients. As a result, medical professionals can analyze clinical decision making based on healthcare data and information. \begin{table}
\begin{tabular}{c c c c c} \hline
IoMT is developed to respond to important health problems and concerns and presents many useful services and benefits in the IoMT medical areas, as described in Figure 1.  
Today, IoMT development and data/device management methods have caused security concerns and cyber-security problems. Valid/invalid authentication methods, safe logging, safe data transmission processes, and designing secure interfaces are important challenges in any IoMT system. It is critical to design a proper framework for IoMT systems to respond to all the security concerns and be able to manage complexities, face unexpected attacks, and fend off malicious activities. In the IoMT systems, real-time data are gathered from the wearable sensors of the users in the first step. In the next step, all of the sensed data from different sensors are transmitted to the cloud via Wi-Fi or Bluetooth using smart applications. As shown in Figure 2, all of the healthcare records of the smart surgery, gathered from wearable sensors and medical devices, are stored in a cloud storage center. There are always some attackers/hackers or malware that try to find gaps to acquire or change data. Unfortunately, the data can be maliciously updated in the cloud. In the first step, pre-processing is applied to the health data set; then, we apply the train and test processes to the data set using ML algorithms. We achieve the intrusion categorization from the result of the test process. Here, there are two statuses as \"normal\" or \"anomaly\" detection activities based on the existing protocols with guest login status and the server error rate. If the status is normal, the data are safe, there is no change in the data and so the health data are sent to medical staff for further control. But, if the status is an anomaly, some required security protection policies should be performed to detect the intrusion. Figure 1: IoMT services and benefits. In this work, a novel model is developed for efficient anomaly detection in an IoMT framework using genetic algorithm-random forest (GA-RF) algorithm in comparison to other machine learning algorithms such as support vector machine (SVM), naive Bayes, Bayes net, J48, and random forest algorithms. The random forest algorithm is one of the most famous and commonly used supervised ML algorithms for classification purposes and regression issues. When the number of trees increases in a forest, the forest will be more powerful. Likewise, many numbers of trees in a random forest algorithm causes the algorithm to achieve higher accuracy. This algorithm creates decision trees on different models and considers their high value for classification and average value in regression. By using the random forest algorithm, we can build our model to achieve intrusion categorization purposes with the highest accuracy and precision, rather than the other applied ML algorithms. Implementation of the optimized random forest algorithm using a genetic algorithm as a hybrid GA-RF algorithm was presented [19] to determine an optimal sub forest from a random forest algorithm [20]. For the proposed model, decision random forest sets as initial points are applied for the training method.