Skip to content

This is a Python implementation of a Decision Tree classifier. It includes methods for loading data from a CSV file, building a decision tree, making predictions, and evaluating the model's performance using various metrics.

License

Notifications You must be signed in to change notification settings

AnasSohailZafar/Decision-Tree-Classifier-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Decision-Tree-Classifier-Project

This is a Python implementation of a Decision Tree classifier. It includes methods for loading data from a CSV file, building a decision tree, making predictions, and evaluating the model's performance using various metrics.

Features

  • Load data from a CSV file.
  • Build a decision tree classifier.
  • Predict class labels for new instances.
  • Evaluate the model's performance using accuracy and other metrics.
  • Generate a learning curve to analyze the model's performance with different training set sizes.

Requirements

  • Python 3.x
  • matplotlib

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/decision-tree-classifier.git

Change to the project directory:

cd decision-tree-classifier

Install the required dependencies:

pip install -r requirements.txt

Usage

Prepare your dataset by creating a CSV file with the appropriate format. Make sure the last column represents the class labels.

Update the code in decision_tree.py as needed. You may modify the DecisionTree class to add additional functionality or customize the behavior.

Train and evaluate the decision tree classifier:

python decision_tree.py

This will load the dataset, split it into training and testing sets, train the model, and evaluate its performance using various metrics.

Review the evaluation metrics, confusion matrix, and learning curve generated by the script.

Contributing

Contributions to this project are welcome. If you would like to contribute, please follow these steps:

  1. Fork the repository.

  2. Create a new branch.

  3. Make your enhancements or bug fixes.

  4. Create a pull request with a descriptive title and explanation of your changes.

License

This project is licensed under the MIT License.

Contact Information

For any questions or suggestions, please feel free to reach out :

Name: Anas Sohail Zafar

Email: anassohailzafar@gmail.com

GitHub: github.com/AnasSohailZafar

Linkedin: www.linkedin.com/in/anas-sohail-zafar123

About

This is a Python implementation of a Decision Tree classifier. It includes methods for loading data from a CSV file, building a decision tree, making predictions, and evaluating the model's performance using various metrics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages