Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

fig, axes = plt.subplots(figsize=(50, 5))
tree.plot_tree(
    classifier3["decisiontreeclassifier"],
    feature_names=classifier3[:-1].get_feature_names_out(),
    class_names=["Good", "Bad"],
    rounded=True,
    precision=1,
    filled=True,
    impurity=False,
    fontsize=10,
)
from sklearn import tree

for dt_estimator in classifier["gradientboostingclassifier"].estimators_:
    dt = dt_estimator[0]
    fig, axes = plt.subplots(figsize=(50, 5))
    tree.plot_tree(
        dt,
        feature_names=classifier[:-1].get_feature_names_out(),
        class_names=["Good", "Bad"],
        rounded=True,
        precision=1,
        filled=True,
        impurity=False,
        fontsize=10,
    )