# Regional Traffic Event Detection Using Data Crowdsourcing
## 3 Proposed Regional Traffic Event Detection Technique
### Event Type Extraction  
Event type extraction is the process by which events in traffic data are classified into specific types. It performs an essential role in understanding and quickly responding to or preventing traffic conditions. Traffic safety and efficiency can be increased through event type distraction, which is performed by machine learning. Traffic data should first be processed by a text classification algorithm to extract important information influencing the event type. For this purpose, natural language processing (NLP) and machine learning algorithms are generally used. Data refinement, preprocessing, and feature extraction processes are also performed to increase extraction accuracy. This process makes accurate and reliable event type extraction is possible. Figure 2 shows an overall flowchart of the event classification process. Event type extraction consists of two stages: Event Selection and Categorize Selected Event Types. In the Word Embedding stage, frequency-inverse document frequency (TF-IDF) values for each word are calculated, vectorized, and stored in the model. Vectorization is performed by the model when storing the words in each post. At the Event Selection stage, the data are divided into relevant and irrelevant data. Only data that influence traffic conditions were selected. This step prevents inaccuracies in the traffic event extraction stage. Subsequently, the Categorize Selected Event Types stage determines the event types of the selected traffic events. Figure 2: Event classification flowchart. Table 1 shows the event types and event meanings. In this study, traffic-related data were classified into six events (accident, construction, special events, weather, congestion, and others) according to traffic events defined by Korea's National Transportation Information Center [18]. In this study, TF-IDF was used as the word-embedding method for machine learning. TF-IDF is a statistical method that calculates the relative importance of words in text data and assigns weight values based on word frequency throughout an entire document [19]. Thus, it reflects the importance of each word in a document. Through this approach, the model can know the meaning and relative importance of words to accurately identify event types. During Event Selection, a binary classifier is used to classify the data into relevant and irrelevant data, to select only the data influencing traffic conditions. Figure 3 shows an example of Event Selection. Posts that have completed preprocessing are divided by word and maintain an array form. An embedding model is used to vectorize the words in these arrays into numbers. Machine learning is applied to the vectorized values, deriving a result of 1 if the post is related to a traffic event, and 0 if the post is not. In this study, we performed event classification using five binary classification models: naive Bayes, random forest, support vector classifier (SVC), linear SVC, and logistic regression [20; 21; 22; 23; 24]. Binary classification refers to the problem of classifying data into 1 s (true) or 0 s (false). In other words, it classifies data into two classes according to the data form. \begin{table}
\begin{tabular}{c l} \hline \hline
**Event Type** & \multicolumn{1}{c}{**Meaning**} \\ \hline \multirow{3}{*}{Traffic accident} & Data representing accidents that occur when vehicles collide, from accident \\  & occurrence until settlement. \\  & Collision accidents, single-car accidents, etc. \\  & All construction occurring on a road. \\  & Road construction, roadside tree work, etc. \\  & Data representing special events where many people gather. \\  & Assemblies, festivals, etc. \\  & Data representing inclement weather. \\  & Fog, rain, wind, etc. \\  & Data representing congestion on certain road sections. \\  & Data that cannot be depicted as accidents, construction, special events, \\  & weather, or congestion. \\  & Fallen objects, animal carcasses, vehicle malfunctions, etc. \\ \hline \hline \end{tabular}
\end{table}