mirror of
https://github.com/apachecn/ailearning.git
synced 2026-02-13 15:26:28 +08:00
更新03决策树 输出路径
This commit is contained in:
@@ -93,7 +93,7 @@ def show_pdf(clf):
|
||||
dot_data = StringIO()
|
||||
tree.export_graphviz(clf, out_file=dot_data)
|
||||
graph = pydotplus.graph_from_dot_data(dot_data.getvalue())
|
||||
graph.write_pdf("testResult/tree.pdf")
|
||||
graph.write_pdf("output/03.DecisionTree/tree.pdf")
|
||||
|
||||
# from IPython.display import Image
|
||||
# Image(graph.create_png())
|
||||
|
||||
@@ -40,6 +40,6 @@ def replaceNanWithMean():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
dataMat = loadDataSet('data/13.PCA/testSet.txt')
|
||||
dataMat = loadDataSet('input/13.PCA/testSet.txt')
|
||||
lowDmat, reconMat = pca(dataMat, 1)
|
||||
print shape(lowDmat)
|
||||
|
||||
Reference in New Issue
Block a user