Created decision tree, implemented ID3 and CART training algorithms, and trained on medical dataset.
A pre-processed medical dataset with 377 binary symptom columns and 700+ classification labels. Link: https://www.kaggle.com/datasets/dhivyeshrk/diseases-and-symptoms-dataset?resource=download
- cd src
- g++ -Wall -Werror -Wextra -g -std=c++20 -o out *.cpp
- ./out
- cd src
- brew install swig (only first time)
- swig -c++ -python my_lib.i
- Should generate these in src:
- my_lib_wrap.cxx - Generated by swig
- my_lib.py - Generated by swig
- g++ -std=c++14 -undefined dynamic_lookup -shared -fPIC
$(python3-config --includes)
-Wl,-rpath,/opt/anaconda3/lib
CART.cpp Data.cpp DecisionTree.cpp ID3.cpp my_lib_wrap.cxx
-o _my_lib.so
- wsl
- cd src
- install swig (via sudo apt get)
- swig -c++ -python my_lib.i
- g++ -std=c++14 -shared -fPIC
$(python3-config --includes)
CART.cpp Data.cpp DecisionTree.cpp ID3.cpp trie.cpp my_lib_wrap.cxx
-o _my_lib.so
- Note: You need to modify one of the columns in the data that has "skin dryness, peeling, scaliness, or roughness" to "skin dryness or peeling or scaliness or roughness". You also need to change "muscle cramps, contractures, or spasms" to "muscle cramps or contractures or spasms"