Skip to content

ephraimc/C395-ID3ImageClassifier

Repository files navigation

To run this program, please refer to config.py, where you will set the following variables:

1. TrainingFile = file name containing data to train trees
2. TestFile = file name containing data for trees to generate predictions
3. tieBreaker = 1 or 2, referring to method 1 or method 2
  * method 1 resolves ambiguity by frequency of examples
  * method 2 resolves ambiguity by distribution of examples

Command line input:
python main.py

Expected output:
1. Confusion matrices and performance metrics for chosen training data and tieBreaker
2. Predictions for unseen data generated by our trees

Python 2.7.12 is required with the following libraries:
1. scipy.io
2. random
3. numpy
4. math

main.py outputs predictions and confusion matrices
config.py contains variables to be configured before running the program
functions.py contains functions for building a tree
classify.py contains functions for classifying an example
makeFinalTrees.py trains trees on entire data set for submission
Node.py contains the nodes used for building trees
predictions.py contains functions used to combine trees to generate final predictions
tenFold.py contains functions used in cross-validation
evaluations.py contains functions used to generate confusion matrices

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages