Breast Cancer Classification Using Decision Tree Classifier

A pipeline to classify breast tumors (malignant vs. benign) using a Decision Tree model on clinical feature data.

Category
Machine Learning
Completion Date
February 2025
Technologies Used
Python 3 & Jupyter Notebook train_test_split MinMaxScaler DecisionTreeClassifier accuracy_score precision_score recall_score f1_score confusion_matrix
Project File
Downloading is only permitted with permission from Ameen Qahtan. Contact him to get permission.

Project Overview

<table><tbody><tr data-start=\"2142\" data-end=\"2760\"><td data-start=\"2173\" data-end=\"2760\" data-col-size=\"xl\">The notebook begins by loading the <code data-start=\"2210\" data-end=\"2229\">Breast cancer.csv</code> dataset with pandas and displaying the first rows . It drops non-predictive columns (<code data-start=\"2389\" data-end=\"2393\">id</code>, <code data-start=\"2395\" data-end=\"2408\">Unnamed: 32</code>), encodes the target <code data-start=\"2430\" data-end=\"2441\">diagnosis</code> (M → 1, B → 0) , and scales features with a MinMaxScaler. After splitting into train/test sets, it trains a <code data-start=\"2624\" data-end=\"2665\">DecisionTreeClassifier(random_state=42)</code>, then evaluates performance via accuracy, precision, recall, F1-score, and confusion matrix.</td></tr></tbody></table><table><tbody><tr data-start=\"2761\" data-end=\"3160\"><td data-start=\"2761\" data-end=\"2792\" data-col-size=\"sm\"></td></tr></tbody></table>

Project File

Preview of the project's File