Predicting Breast Cancer Diagnosis with Gaussian Naive Bayes Classifier

Published: 01 May 2024
on channel: PythonicAlgorithmicHub
32
5

This code demonstrates the implementation of a Gaussian Naive Bayes classifier for predicting breast cancer using the breast cancer dataset available in scikit-learn. It splits the dataset into training and testing sets, trains the classifier on the training data, and evaluates its performance on the testing data. The code calculates both training and testing accuracy and generates a classification report and confusion matrix for the testing data. Finally, it visualizes the confusion matrix to provide a graphical representation of the classifier's performance in predicting benign and malignant tumors.

Github link
- https://github.com/IbtasamUrRehman1/m...