How mastersabh/heart-disease-prediction-using-naive-bayes-classifier works
Project type and purpose
• This is a self-contained data-science/ML utility written in Python, focused on binary classification (heart-disease prediction) using Naive Bayes.
• It provides two model-training pipelines:
• NB_from_scratch.py – a custom implementation of Naive Bayes
• NB_Gaussian_Sklearn.py – a wrapper around sklearn’s GaussianNB
• It reads a flat CSV/text dataset, runs five random train/test splits, computes accuracy, and compares results.
File structure
• Top-level files only, no nested modules:
• NB_from_scratch.py
• NB_Gaussian_Sklearn.py
• README.md
• heartdisease.csv / heartdisease.txt (raw dataset)
• No web frontend, no database server – purely a command-line/data pipeline.
• No build or deployment scripts; Python is the only runtime environment.
README for additional insights
• Confirms use of UCI Heart Disease dataset with 14 features per patient.
• Describes the evaluation methodology (5 random partitions) and result aggregation.
Elements
• Clear labels for each block: “Data Ingestion,” “Partitioning,” “Custom NB Trainer,” “Sklearn NB Trainer,” “Evaluator,” “Reporter.”
• Compute components (model trainers, evaluator) in another (green)
• Reporting/Output in a third (orange)
• Path A → “NB_from_scratch.py (Custom Naive Bayes)”
• Path B → “NB_Gaussian_Sklearn.py (sklearn GaussianNB)”
• Both paths converge into “Model Evaluation (accuracy per split).”
• Loop around Partitioning→Training→Evaluation as “Repeat for 5 random splits.”