[Python] Convert Decision tree from text 2 visual

Discussão em 'Python' iniciado por Stack, Novembro 27, 2024.

  1. Stack

    Stack Membro Participativo

    I have a decision tree output in a 'text' format which is very hard to read and interpret. There are ton of pipes and indentation to follow the tree/nodes/leaf. I was wondering if there are tools out there where I can feed in a decision tree like below and get a tree diagram like Weka, Python, ...etc does?

    Since my decision tree is very large, below is the sample/partial decision to give an idea of my text decision tree. Thanks a bunch!

    "bio" <= 0.5:
    | "ml" <= 0.5:
    | | "algorithm" <= 0.5:
    | | | "bioscience" <= 0.5:
    | | | | "microbial" <= 0.5:
    | | | | | "assembly" <= 0.5:
    | | | | | | "nano-tech" <= 0.5:
    | | | | | | | "smith" <= 0.5:
    | | | | | | | | "neurons" <= 0.5:
    | | | | | | | | | "process" <= 1.5:
    | | | | | | | | | | "program" <= 1.5:
    | | | | | | | | | | | "mammal" <= 1.0:
    | | | | | | | | | | | | "lab" <= 0.5:
    | | | | | | | | | | | | | "human-machine" <= 1.5:
    | | | | | | | | | | | | | | "tech" <= 0.5:
    | | | | | | | | | | | | | | | "smith" <= 0.5:

    Continue reading...

Compartilhe esta Página