[Python] Draw a decision tree while hiding the values ​of the "value" row

Discussão em 'Python' iniciado por Stack, Fevereiro 18, 2025.

  1. Stack

    Stack Membro Participativo

    I want to simplify the decision tree output and hide the values in the "value" field.Below is the code I am using

    enter image description here

    fig, ax = plt.subplots(figsize=(10, 10))
    plt.figure(figsize=(210,10))
    plot_tree(m,
    feature_names=X.columns,
    filled=True,
    impurity=True,
    rounded=True,
    proportion = True,
    max_depth = 3)

    plt.show()

    Continue reading...

Compartilhe esta Página