Skip to content

AbdullahAlForman/Clas-Decision-Trees-drug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published