export_graphviz() got an unexpected keyword argument 'class_name'
时间: 2023-10-04 21:08:00 浏览: 94
The error message "export_graphviz() got an unexpected keyword argument 'class_name'" indicates that the function "export_graphviz()" was called with an argument that is not recognized.
The "export_graphviz()" function is part of the scikit-learn library and is used to export decision tree models in Graphviz format. It does not have a "class_name" argument.
It is possible that you are using a third-party package or a modified version of scikit-learn that includes a "class_name" argument in the "export_graphviz()" function. In this case, you should check the documentation for the package or the modified version of scikit-learn that you are using to see if "class_name" is a valid argument for the "export_graphviz()" function.
Alternatively, you may have made a typo in the argument name, and intended to use a different argument instead. Double-check your code to make sure that you are using the correct argument names for the "export_graphviz()" function.