In dt.py, you will implement a basic decision tree classifier for
binary classification. Your implementation should be based on the
minimum classification error heuristic (even though this isn't ideal,
it's easier to code than the information-based metrics).
"""
def __init__(self, opts):
"""
Initialize our internal state. The options are:
opts.maxDepth = maximum number of features to split on
(i.e., if maxDepth == 1, then we're a stump)
"""

self.opts = opts

# initialize the tree data structure. all tree nodes have a
# "isLeaf" field that is true for leaves and false otherwise.
# leaves have an assigned class (+1 or -1). internal nodes
# have a feature to split on, a left child (for when the
# feature value is < 0.5) and a right child (for when the
# feature value is >= 0.5)

self.isLeaf = True
self.label = 1