决策树算法可视化学习
2018-07-26 本文已影响37人
果果求学者
决策树可视化一般有三种方式:
必备的安装工具:主要包括graphviz的安装和python的graphviz插件的安装。
首先:安装graphviz。官网地址在:http://www.graphviz.org/。如果是windows,就在官网下载msi文件安装。
然后:装完后都要设置环境变量,将graphviz的bin目录加到PATH,我的电脑(D:\installsoftware\graphviz\bin)加入了PATH
最后:插件安装:安装python插件graphviz: pip install graphviz
安装python插件pydotplus: pip install pydotplus
比如:graphviz安装:

scikit-learn: http://scikit-learn.org/stable/ (官网) ,如下图所示:
scikit-learn更新虽然很慢,但是如果你安装Anaconda的时间很久了,你可以在anaconda prompt进行更新——conda update sklearn 来进行更新库

在scikit-learn这个强大的工具里:包含了一些有用的东西如,常见的算法(分类,回归等算法)、example代码(可以看很多可视化展示的图:你可以把别人展示的模板去套用、学习)、API模块(tutorials的学习)代码的学习(可以去查找相关函数)。
