CLUSTERING DATA KECELAKAAN LALU LINTAS BERDASARKAN JENIS KENDARAAN DI KABUPATEN LANGKAT MENGGUNAKAN METODE K-MEANS
Keywords:
K-Means, Traffic Accident, Clustering, Vehicle Type, MATLABAbstract
This study aimed to group traffic accident data in Langkat Regency based on vehicle type using the K-Means clustering method. The data consisted of 634 entries and were analyzed using three variables: type of vehicle, accident location, and victim condition. The K-Means algorithm was implemented using MATLAB R2014b, and clustering was tested using 3, 4, and 5 clusters. The results showed that the 5-cluster configuration produced the lowest average variance value of 3.7229, indicating the most compact and stable grouping compared to the 3-cluster (8.5359) and 4-cluster (5.2321) configurations. However, some clusters still contained outliers that affected centroid accuracy. The findings from the clustering process, presented in both table and 3D visualization formats, are expected to help the Langkat Traffic Police Unit identify patterns and risk-prone areas based on the dominant vehicle type involved. The study demonstrated that the K-Means method is effective in organizing complex accident data into clear and actionable groups