Code for implementing Decision Trees with Information Gain and Variance Purity heuristics in Python 3.
Code written by Ishan Sharma (ixs171130@utdallas.edu) as part of CS6375 (Spring 2018) class assignment at University of Texas at Dallas.
Make sure that you have Python 3 and Pandas installed.
At least Python 3.2 is required.
PIP is required to install Pandas.
- Open the project folder in terminal and run
pip install pandas
- Run using
python3 ./decision_tree <L> <K> <training-set> <validation-set> <test-set> <to-print>
L
,K
are arguments for random pruningtraining-set
is absolute or relative path to the training setvalidation-set
is absolute or relative path to the training settest-set
is absolute or relative path to the test setto-print
should be 'yes' or 'no' depending on whether you want to see the pruned trees printed or not
You can also see the argument descriptions by entering python3 ./decision_tree -h
in terminal.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.