Skip to content

KhalilIbrahimm/DecisionTree_implementation_from_scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup and Requirements

  1. The project uses Python 3.11.

  2. Create a virtual environment by running the following command in the terminal:

    python3 -m venv venv

    Then, activate the virtual environment:

    source venv/bin/activate
  3. Install the necessary packages by running the following commands:

    pip install numpy
    pip install pandas
    pip install matplotlib
    pip install scikit-learn
  4. Ensure you have the wine dataset in the project folder, under the "data" directory. The file should be named "... .csv". Ops! Make sure to change filename also in main.ipynb!

File Structure and Explanation

The project folder contains the following files and their purposes:

  • Node.py: This is a class representing nodes in the decision tree.

  • DecisionTree.py: This is a Python class that contains the implementation of the decision tree, including training and prediction.

  • main.ipynb: This is the main program to be executed. Here you will find code for evaluation, testing, and generating final results based on the selected models. To generate final results, install all the necessary packages and run main.ipynb by choosing "Run All" after opening the project file.

Note:

  • The project's report is located in the "report" directory within the project folder. This directory contains the report and related files. The report should not be run as part of the project, but it provides a deeper understanding of the project's methods and results.

Best_-DecisionTree_from_scratch

About

DecisionTree Implementation from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published