from sklearn.tree import export_graphviz
import graphviz
features = x_azar.columns
dot_data = export_graphviz(modelo, out_file=None, filled=True, rounded=True,
class_names=["não", "sim"],
feature_names = features)
graph = graphviz.Source(dot_data)
graph
NotFittedError Traceback (most recent call last)
<ipython-input-11-f3a6373a4d1c> in <cell line: 5>()
3
4 features = x_azar.columns
----> 5 dot_data = export_graphviz(modelo, out_file=None, filled=True, rounded=True,
6 class_names=["não", "sim"],
7 feature_names = features)
1 frames
/usr/local/lib/python3.9/dist-packages/sklearn/utils/validation.py in check_is_fitted(estimator, attributes, msg, all_or_any)
1388
1389 if not fitted:
-> 1390 raise NotFittedError(msg % {"name": type(estimator).__name__})
1391
1392
NotFittedError: This SVC instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator.