Table 3 Pseudo code.

From: Responsible CVD screening with a blockchain assisted chatbot powered by explainable AI

START

// Step 1: Data Loading

Load dataset from the source

// Step 2: Data Preprocessing

Perform EDA

Remove duplicates and check for null values

Handle missing values if any

Feature selection based on relevance

Apply SMOTE for handling class imbalance (if needed)

Normalize/Standardize numerical features

// Step 3: Splitting Data

Split data into Training set (70%) and Testing set (30%)

// Step 4: Model Implementation

Select an ML model (e.g., XGBoost)

Train the model on the Training set

Evaluate the model using the Testing set

// Step 5: Model Evaluation

Calculate performance metrics (e.g., Accuracy, Precision, Recall)

Check if the model detects ‘CVD’ or ‘No CVD

IF model performance is satisfactory THEN

Proceed to XAI implementation

ELSE

Modify model or preprocessing steps and retrain

// Step 6: XAI Implementation (e.g., SHAP & LIME)

Generate explanations for model predictions using XAI techniques

Display or store the explanations

// Step 7: Make Predictions

Input new data into the trained model

Predict whether the patient has ‘CVD’ or ‘No CVD’

Display predictions and explanations

// Step 8: Decision and Action

IF ‘Health Disease’ is predicted THEN

Recommend further medical consultation

ELSE

No further action required

END