## 8 Conclusions  
This paper proposed a method for classifying narcotic data using IMS in port containers. Related research on classification algorithms, KNN, machine learning, and deep learning methods through air intake in port containers were examined. After that, the features of the narcotic IMS data were examined, considering that narcotic IMS data are not a widely used benchmark dataset. Based on these features, a preprocessing method that takes the median value using the window was taken, and the threshold, KNN, TSF, and ROCKET algorithms were applied. The classification performance index using only the model was somewhat low; thus, to apply it to the system to change the degree of reaction in the response section shown in the narcotic IMS data, one csv file was divided into RIP2 RIP data, and most output from the inference label for each RIP2 RIP was set as a prediction label. Through the above methodology, results of improved performance indicators in all algorithms can be obtained. Moreover, the recall indicators were all 1 in the performance indicators. In this respect, there was no case of misclassification. This can gain confidence in the system from port operators who operate narcotic IMS detectors, and this can eliminate unnecessary fatigue of the operators. In terms of time, absolute time reduction was confirmed by applying the created system to the embedded board, and it was confirmed that it operated in less than a minute even on the embedded board. The most suitable algorithm for processing port narcotics IMS data was the KNN (\(k=4\)) algorithm. In this way, by comparing the performances of narcotic IMS steam data using the machine learning algorithm and using the features of the data, a system that detects a total of eight types of narcotics using the air inside the actual container may be expected. Moreover, this study utilized IMS data acquired from samples of 100 ng and 300 ng. This is promising as it indicates that even if only ten-millionths of the substance is present when air inside a container--where drugs are transported in kilogram units--is inhaled, trace amounts of drugs can be detected. In this study, we have confirmed significant performance by conducting classification based on data acquired in a limited experimental environment. However, since the data used in the experiment were obtained in a restricted environment, further experiments are required with data collected from actual containers. Furthermore, to address the limitations of IMS data, such as the necessity of a reference library and the inability to measure mixtures, we intend to conduct additional research on augmented learning and data feature extraction algorithms [36]. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithm** & **Max (s)** & **Min (s)** & **Average (s)** \\ \hline KNN (\(k=1\)) & 2.2 & 1.8 & 2.17 (4) \\ KNN (\(k=2\)) & 2.2 & 1.9 & 2.09 (1) \\ KNN (\(k=3\)) & 2.2 & 1.9 & 2.12 (3) \\ KNN (\(k=4\)) & 2.2 & 1.9 & 2.10 (2) \\ TSF & 9.5 & 4.3 & 4.98 (5) \\ ROCKET & 33 & 31 & 31.7 (6) \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Algorithm running time. **Author Contributions:** Conceptualization, T.I. ; methodology, T.I. ; software, S.P. ; validation, G.K.; formal analysis, S.P. ; investigation, S.P. ; resources, S.C.; data curation, S.P. ; writing--original draft preparation, S.P. ; writing--review and editing, T.I. ; visualization, S.P. ; supervision, T.I. ; project administration, T.I. ; funding acquisition, K.K. All authors have read and agreed to the published version of the manuscript. **Funding:** This research was supported by Korea Institute of Marine Science & Technology Promotion (KIMST) funded by the Ministry of Oceans and Fisheries, Korea (20200611). This research was supported by Korea Institute of Marine Science & Technology Promotion (KIMST) funded by the Ministry of Oceans and Fisheries, Korea (202201653).