I\'m trying to visualize my DecisionTree, but getting the error The code is:
X = [i[1:] for i in dataset]#attribute y = [i[0] for i in dataset] clf = tree.Decisi
The line in question is checking to see if the stream/file is encoded as UTF-8
Instead of:
if data.startswith(codecs.BOM_UTF8):
use:
if codecs.BOM_UTF8 in data:
You will likely have more success...