ALGORITHMS
• INPUT:
• Install ADAS units on 5 buses operating in Chennai and outskirts
• Continuously collect data for 60 days (June 1st – August 31st, 2022)
• Record real-time parameters from the ADAS system:
- GPS coordinates (latitude, longitude) - Time and date of observation - Speed of the vehicle
- Driver alert type and severity
• Integrate contextual environmental data where available:
-Weather conditions (e.g., rain, clear) - Road type (e.g., highway, city road) - Traffic density (low, medium,
high)
• Store and aggregate over 100,000 km of operational data into dataset
• Prepare D for preprocessing and model training steps
School of Computer Science Engineering
Date:12/4/25 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Slide Number: 41
ALGORITHMS
OUTPUT:
• Preprocess D:
• Handle missing values using imputation
imputer = SimpleImputer(strategy="most_frequent")
D = imputer.fit_transform(D)
• Encode categorical features
encoder = OrdinalEncoder()
D = encoder.fit_transform(D)
• Normalize numerical features
scaler = StandardScaler()
D = scaler.fit_transform(D)
School of Computer Science Engineering
Date:12/4/25 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Slide Number: 42
ALGORITHMS
• Balance the dataset:
• Apply under-sampling to address class imbalance
rus = RandomUnderSampler()
X_res, y_res = rus.fit_resample(X, y)
• Perform feature selection:
• Use ANOVA F-test to select top-k features
selector = SelectKBest(score_func=f_classif, k=10)
X_selected = selector.fit_transform(X_res, y_res)
• Split D into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X_selected, y_res)
School of Computer Science Engineering
Date:12/4/25 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Slide Number: 43
ALGORITHMS
• Initialize a list of candidate models:
• Logistic Regression, Random Forest, XGBoost, etc.
models = [LogisticRegression(), RandomForestClassifier(), XGBClassifier()]
• For each model M in candidate models do
• Create a pipeline with preprocessing and M
pipe = Pipeline([("scaler", scaler), ("model", M)])
• Apply GridSearchCV for hyperparameter tuning
grid = GridSearchCV(pipe, param_grid, cv=5)
• Train M on training data
[Link](X_train, y_train)
• end for
School of Computer Science Engineering
Date:12/4/25 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Slide Number: 41
ALGORITHMS
• Evaluate all models using accuracy, F1-score, and confusion matrix
metrics.classification_report(y_test, [Link](X_test))
• Select the best model M*
• Predict accident hotspot risk using M* and spatiotemporal features
risk_scores = M*.predict(new_spatiotemporal_data)
• Visualize hotspot predictions on geographic plots
[Link](data=risk_map_matrix) or [Link]()
School of Computer Science Engineering
Date:12/4/25 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Slide Number: 41
PROJECT OUTCOME
• Paper Submitted in International Conference on Recent Advances in
Emerging Computing and Communication Technologies
(ICRAECCT2025)
• Paper ID: 289
School of Computer Science Engineering
Date:12/4/25 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Slide Number: 41