Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 2.21 KB

README.md

File metadata and controls

50 lines (39 loc) · 2.21 KB

Decision Trees for Drug Classification

This project showcases the implementation of Decision Tree Classification to predict drug types based on patient attributes. By leveraging the power of scikit-learn, the project explores how decision trees can handle categorical and numerical data effectively.

📚 Key Highlights

  • Data Preparation: Processes a healthcare dataset containing patient characteristics (age, sex, blood pressure, and cholesterol levels) and drug types.
  • Decision Tree Implementation: Builds and visualizes decision tree models for classification tasks.
  • Performance Evaluation: Measures the accuracy of the trained model to ensure reliable predictions.
  • Tree Visualization: Demonstrates the structure of the decision tree for interpretability.

🚀 Quick Start

Prerequisites

  • Python 3.8+
  • Libraries: numpy, pandas, matplotlib, seaborn, sklearn

Install dependencies using:

pip install -r requirements.txt

Steps to Run

  1. Clone the repository:

    git clone https://github.com/AbdullahAlForman/Decision-Trees-Drug-Classification.git
    cd Decision-Trees-Drug-Classification
  2. Open the notebook:

    jupyter notebook Class-Decision-Trees-drug.ipynb
  3. Execute the cells step-by-step to build the model and analyze results.

📊 Project Workflow

  1. Exploratory Data Analysis (EDA): Analyzes the features and their relationships with drug types.
  2. Data Preprocessing: Encodes categorical variables and splits data into training and testing sets.
  3. Model Training: Trains a decision tree classifier using the sklearn library.
  4. Evaluation and Visualization: Evaluates model performance and visualizes the decision tree structure.

🏆 Results

  • Achieved a high classification accuracy on the test set.
  • Generated an intuitive decision tree for identifying patterns in the data.

📁 Repository Contents

  • Notebook: Class-Decision-Trees-drug.ipynb
  • Dataset: Patient data for drug classification (details in the notebook).

🤝 Contributing

Have ideas to improve the project? Feel free to fork the repo and submit pull requests!