## 6 Experiment Preparation and Results  
### Dataset Composition  
To evaluate the classification accuracy performance of each model for narcotic IMS data, all types of narcotic IMS data were trained in the KNN, TSF, and ROCKET algorithms except the threshold, and experiments were conducted in the threshold algorithm except for amphetamines, diazepam, and morphine, which had overlapped response sections. For fitting data, 20 pieces of fitting data were used from all narcotic IMS data, and the rest were used as test data given that the MDMA HCI of the narcotic IMS data was 35, which was the smallest number as shown in Table 2. In the case of the threshold algorithm, because the learning process was not required, only test data were used (i.e., without training data) for equal comparison. As mentioned in Section 4, in the preprocessing process, the window section was set to 10, the median value was taken, and [PERSON]'s find_peaks was used to divide the data consisting of one csv file into RIP2 RIP. Therefore, in one csv file, about 800 RIP2 RIPs were obtained for each sample, and a total of 7200 data in nine types of states were trained in the model. For the training and testing data lengths for classification, data with a data index of up to 1500 points were used, referring to the data time index of Alfentanil HCI, which had the largest response section data index in Figure 1 (from 850 to 1000 points). The number of csv files and RIP2 RIP used for test data are shown in Tables 3 and 4, respectively.  
In this paper, a total of four algorithms were used: threshold, Python package Ppts' KNN, TSF, and Python package sktime's ROCKET [34; 35]. First, in the case of the threshold algorithm, an experiment was conducted by setting the response section by reflecting the heat map of the data and setting the median value in the response section as the threshold. The standards for the threshold are shown in Table 5.  
KNN was used in an experiment by increasing the value of K (an important factor in data classification) from 1 to 4. In the case of the TSF algorithm, the number of decision trees that made up a random forest was set to 500, the window size for extracting features was set to 150 (10% of the input data), and _Entropy_ was used as the division criterion. In the ROCKET algorithm, the number of kernels was set to 1000. The remaining hyperparameters were set to default. In this experiment, the classification performance indicators were compared using two system algorithms that applied the model considering the features of the narcotic IMS data, as shown in Figure 8, and the experiment that applied the data to each algorithm.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & **Alf** & **Amp** & **Cod** & **Dia** & **Fen** & **Ket** & **MDMA** & **Mor** & **Normal** \\ \hline Number of testing & & & & & & & & & \\ \multicolumn{1}{c}{SCV (times)} & 35 & 30 & 25 & 54 & 37 & 32 & 35 & 15 & 32 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Number of testing cvs files.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & **ALF** & **COD** & **FEN** & **KET** & **MDMA** & **Normal** \\ \hline Data index & 800-950 & 575-625 & 625-800 & 425-525 & 350-425 & — \\ Threshold & 4,050,000 & 4,400,000 & 4,400,000 & 4,700,000 & 4,600,000 & — \\ \hline \hline \end{tabular}
\end{table}
Table 5: Standards for the threshold.