# 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.ipynbFolders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|