Fork, Commit, Merge - Hard Issue (Python) #888
Labels
first-contributor
first-contributors
good first issue
Good for newcomers
hard
help wanted
Extra attention is needed
python
up-for-grabs
Fork, Commit, Merge - Hard Issue (Python)
Implementing a Decision Tree Classifier from Scratch
Note: You don't have ask permission to start solving the issue or get assigned, since these issues are supposed to be always open for new contributors. The actions-user bot will reset the file back to previous state for the next contributor after your commit is merged. So you can just simply start working with the issue right away!
How to get started
For this task you need to have Python and NumPy installed. Check out Installing Python section in README if you need to install Python. If you already have Python installed, you can install NumPy using pip (Python's package installer) with the following terminal command:
Or, if you're using Python 3 specifically and have both Python 2 and Python 3 installed, you may need to use:
After that you can open the
tasks/python/hard
directory from the root of the project.Then open
decision_tree.py
file and start working on your solution!Description
Implement a Decision Tree Classifier from scratch using Python. Do not use libraries like scikit-learn that have pre-implemented classifiers; instead, use basic libraries like NumPy for numerical calculations.
Objectives:
Use any freely available classification dataset. Ensure the dataset has at least 3 features and at least 2 classes.
Implementation Steps:
Testing:
Acceptance Criteria:
Resources:
How to run
Make sure you are in the right directory:
cd tasks/python/hard
Execute the following command to run your Python script:
Expected output
Output should look similar to this:
The predicted class for the sample [0.4, 0.6] is 0.
If the output looks correct, you are ready to make a pull request!
To work with this issue, you need to have Python installed to your local machine.
Check out README.md for more instructions of installing Python and how to make a pull request.
Feel free to ask any questions here if you have some problems!
Also, kindly give this project a star to enhance its visibility for new developers!
The text was updated successfully, but these errors were encountered: