<gh_stars>10-100
# -*- coding: utf-8 -*-
"""
Created on Sat Nov 29 18:17:20 2014

@author: tvu
"""

#!/usr/bin/python

""" lecture and example code for decision tree unit """

import sys
from class_vis import prettyPicture, output_image
from prep_terrain_data import makeTerrainData

import matplotlib.pyplot as plt
import numpy as np
import pylab as pl
from classifyDT import classify

features_train, labels_train, features_test, labels_test = makeTerrainData()



### the classify() function in classifyDT is where the magic
### happens--it's your job to fill this in!
clf = classify(features_train, labels_train)






#### grader code, do not modify below this line

prettyPicture(clf, features_test, labels_test)
output_image("test.png", "png", open("test.png", "rb").read())

# -*- coding: utf-8 -*-
"""
Created on Sat Nov 29 18:17:20 2014

@author: tvu
"""

#!/usr/bin/python

""" lecture and example code for decision tree unit """

import sys
from class_vis import prettyPicture, output_image
from prep_terrain_data import makeTerrainData

import matplotlib.pyplot as plt
import numpy as np
import pylab as pl
from classifyDT import classify

features_train, labels_train, features_test, labels_test = makeTerrainData()



### the classify() function in classifyDT is where the magic
### happens--it's your job to fill this in!
clf = classify(features_train, labels_train)






#### grader code, do not modify below this line

prettyPicture(clf, features_test, labels_test)
output_image("test.png", "png", open("test.png", "rb").read())
# -*- coding: utf-8 -*- Created on Sat Nov 29 18:17:20 2014  @author: tvu #!/usr/bin/python lecture and example code for decision tree unit ### the classify() function in classifyDT is where the magic ### happens--it's your job to fill this in! #### grader code, do not modify below this line