Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DecisionTreeClassifier – README.md

# Decision Tree Classifier – Social Network Ads Dataset

This project uses a Decision Tree Classifier to predict user behavior from the Social Network Ads dataset. It includes feature preprocessing, visualization, and pruning to improve performance and reduce overfitting.

## 📁 Dataset

- **Name:** `Social_Network_Ads.csv`
- **Features:** Age, EstimatedSalary, Purchased
- **Goal:** Predict whether a user will purchase based on demographic data

## 📚 Project Highlights

- Data visualization using matplotlib and seaborn
- Train-test split with evaluation using accuracy score
- Decision tree pruning using:
  - `max_depth`
  - `min_samples_leaf`
  - `min_samples_split`

## 📊 Results

- **Train Accuracy:** ~1.0 (before pruning)
- **Test Accuracy:** ~0.94 (after pruning)

## 🚀 How to Run

```bash
git clone https://github.com/shahzadmustafa15/DecisionTreeClassifier.git
cd DecisionTreeClassifier
pip install -r requirements.txt
jupyter notebook DecisionTreeClassifier.ipynb

Releases

Packages

Contributors

Languages