【发布时间】:2020-04-24 23:56:59
【问题描述】:
我用下面的代码得到了CHAID的决策树
independent_variable_columns = ['gender', 'grade', 'no_renewals', 'complaint_count']
dep_variable = 'switch'
tree = Tree.from_pandas_df(
df,
dict(zip(independent_variable_columns, ['nominal'] * 38)),
dep_variable,
max_depth=2
)
tree.to_tree()
tree.render()
但我收到以下错误
File "C:\Users\data\AppData\Local\Continuum\anaconda3\lib\site-packages\CHAID\graph.py", line 93, in <listcomp>
[os.remove(file) for file in self.files]
FileNotFoundError: [WinError 3] The system cannot find the path specified: '/tmp/157840175993116164207458496094.png'
【问题讨论】:
-
这可能是github.com/Rambatino/CHAID 吗?或者它是一个不同的图书馆?
-
必须是,因为仓库中有a confirmed bug report for a similar error。大概你提交了other issue?
-
维护者在那里要求提供更多信息,如果您自己提供这些信息,您可能可以让他们更快地解决问题。
-
是的,这只是 github.com/Rambatino/CHAID 库
标签: python decision-tree