View on GitHub

Parameter-Tuning-Learners

Assignments, Projects and other course related material.

Back

HW 4

Description

To build a regression tree learner:

Source Files

All source files are present in ./src/ directory

Sdtree.py - Class for Regression Tree Learner

Setup

Code has been tested on Python 2.7.12
If uses files from previous homeworks (1, 2, 3)

Usage

To run the code,

python src/Sdtree.py data/auto.csv

Replace the path of the test file as requried
It uses some source files from HW1, HW2 and HW3. Those paths have been included wherever required
To ensure that it always runs, please run it from this (/HW4/) directory (using the same command above)

Config

The parameters: The maxDepth of the tree and min elements in the leaf nodes, are defined in ../HW1/Config.py
They have been set to maxDepth = 10 and min = 2. They can be changed as required in that file.

References

More details about the instructions can be found at Homeworks