## 3 Results  
Table 3 shows the experimental results of random forest classification in the Spotify dataset for the training and testing sets. The total number of songs used in the experiment is 30,630. The distribution of songs by mood is shown in Figure 4.  
Table 3 shows the random forest model's performance in classifying songs into four emotional categories: love, happy, sad, and angry. Notably, the model exhibits strong performance on the training set, achieving high metrics across all emotion classes, with an overall accuracy of 0.94. This suggests the model effectively learned the patterns within the training data. Figure 3: The system block diagram. However, when evaluated on the test set--unseen data--the model's performance moderately decreases to an accuracy of 0.73, which is expected. This indicates a reasonable ability to generalize its learning to new songs. The results also highlight a class imbalance within the dataset, with \"Sad\" being the most prevalent and \"Angry\" the least. This imbalance potentially impacts the model's performance, especially for the less frequent classes. The \"Angry\" class, in particular, presents challenges, having the lowest F1 score (0.71) on the test set. This suggests potential difficulties in accurately classifying songs within this category, possibly due to limited training examples or the inherent complexity of the emotion itself. In summary, the random forest model shows promise in classifying songs based on emotional content, but further refinement is needed. Addressing the class imbalance and enhancing the model's ability to recognize \"Angry\" are key areas for improvement. Figure 5 shows the UI of the Spotify song play page within the web application. Figure 6 shows the UI of the Thai song mood analysis page. Figure 6 shows that our method classifies this song into two significant emotions: \"happy\", with a confidence score of 49.03%, and \"love\", with a confidence score of 38.50%. More experimental results are also shown in Figure 7. Figure 7a shows that our method classifies this song into two significant emotions: \"love\", with a confidence score of 43.24%, and \"happy\", with a confidence score of 41.75%. Figure 7b shows that our method classifies this song into two significant emotions: \"love\", with a confidence score of 61.08%, and \"happy\", with a confidence score of 22.23%. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Emotion Classes** & \multicolumn{1}{c}{**Precision**} & **Recall** & **F1-Score** & **Support** \\ \hline \multirow{2}{*}{Love} & Train & 0.95 & 0.9 & 0.93 & 7443 \\  & Test & 0.71 & 0.72 & 0.75 & 1488 \\ \hline \multirow{2}{*}{Happy} & Train & 0.97 & 0.9 & 0.93 & 6297 \\  & Test & 0.72 & 0.74 & 0.73 & 1259 \\ \hline \multirow{2}{*}{Sad} & Train & 0.92 & 0.98 & 0.95 & 15,844 \\  & Test & 0.74 & 0.76 & 0.76 & 3168 \\ \hline \multirow{2}{*}{Angry} & Train & 0.99 & 0.85 & 0.92 & 1046 \\  & Test & 0.68 & 0.7 & 0.71 & 210 \\ \hline \multirow{2}{*}{Accuracy} & Train & & & 0.94 & 30,630 \\  & Test & & & 0.73 & 6126 \\ \hline \end{tabular}
\end{table} 
Table 3: The classification results of the random forest model in the train and test set. Figure 4: Songs are distributed by mood in the dataset. The application development allows users to create playlists based on their emotions and accurately analyze user emotions to generate Thai song playlists and create them on Spotify. Users can input their feelings on the main page in the search box to create playlists. They can also click on the initial emotion buttons or the four mood buttons to create playlists. Figure 8 shows the main page components. The shortcut buttons (initial emotion buttons) are arranged at the bottom as follows. The top row from left to right shows the shortcuts for love and happy, while the bottom row from left to right shows the shortcuts for sad and anger. Figure 9 demonstrates creating a playlist based on the user's mood. The user types an emotion in Thai phrases or words, for example, \"synchronising\"Musolith\" (I want to shout 'I love you' so you can hear).