diff --git a/Python Class Work 4 - ML.ipynb b/Python Class Work 4 - ML.ipynb index 941f82d..7300371 100644 --- a/Python Class Work 4 - ML.ipynb +++ b/Python Class Work 4 - ML.ipynb @@ -1312,48 +1312,6 @@ "print(\"DecisionTrees's Accuracy: \", metrics.accuracy_score(y_testset, predTree))" ] }, - { - "cell_type": "code", - "execution_count": 63, - "metadata": {}, - "outputs": [], - "source": [ - "# Notice: You might need to uncomment and install the pydotplus and graphviz libraries if you have not installed these before\n", - "# !conda install -c conda-forge pydotplus -y\n", - "#!conda install -c conda-forge python-graphviz -y" - ] - }, - { - "cell_type": "code", - "execution_count": 64, - "metadata": {}, - "outputs": [], - "source": [ - "#from sklearn.externals.six import StringIO\n", - "#import pydotplus\n", - "#import matplotlib.image as mpimg\n", - "#from sklearn import tree\n", - "#%matplotlib inline " - ] - }, - { - "cell_type": "code", - "execution_count": 65, - "metadata": {}, - "outputs": [], - "source": [ - "#dot_data = StringIO()\n", - "#filename = \"drugtree.png\"\n", - "#featureNames = dfLabs.columns[0:5]\n", - "#targetNames = dfLabs[\"Drug\"].unique().tolist()\n", - "#out=tree.export_graphviz(drugTree,feature_names=featureNames, out_file=dot_data, class_names= np.unique(y_trainset), filled=True, #special_characters=True,rotate=False) \n", - "#graph = pydot.graph_from_dot_data(dot_data.getvalue()) \n", - "#graph.write_png(filename)\n", - "#img = mpimg.imread(filename)\n", - "#plt.figure(figsize=(100, 200))\n", - "#plt.imshow(img,interpolation='nearest')" - ] - }, { "cell_type": "markdown", "metadata": {},