mirror of
https://github.com/apachecn/ailearning.git
synced 2026-05-08 06:33:55 +08:00
更新03决策树 输出路径
This commit is contained in:
BIN
output/03.DecisionTree/tree.pdf
Normal file
BIN
output/03.DecisionTree/tree.pdf
Normal file
Binary file not shown.
@@ -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)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user