All Apps and Add-ons

Is there an app for a decision tree graph?

ericchaucl
Path Finder

Hi,

After building a machine learning model using DecisionTreeRegressor or DecisionTreeClassifier, I can use the "| summary" command to list out the content.

Is there any better way to visualize the tree instead of row by row? Say, graphviz can plot a tree nicely (see picture as reference). Any customized codes or Splunk app can do this?

alt text

1 Solution

oda
Communicator

https://splunkbase.splunk.com/app/3379/
I think that you can do it with this APPS!

View solution in original post

oda
Communicator

https://splunkbase.splunk.com/app/3379/
I think that you can do it with this APPS!

ericchaucl
Path Finder

Thanks for your quick reply! The app looks pretty nice and will have a try on it. Seems I need to write codes to transform the results to fit into this chart.

Please forgive my laziness. Just wonder if there is any existing app/code that already can present the summary results from Machine Learning Toolkit directly? As the output from Splunk is in a standard format like below, hopefully Splunk or some developer has already write the code to present it in a nicer way:

Decision Tree Summary
|-- count:10 split:age<=22.500 value:0.404 impurity:0.036
|------ count:1 split:N/A - Leaf node value:0.100 impurity:0.000
|------ count:9 split:age<=46.500 value:0.438 impurity:0.028
|---------- count:8 split:age<=41.500 value:0.475 impurity:0.019
|-------------- count:7 split:age<=40.500 value:0.429 impurity:0.005
|------------------ count:6 split:sex<=1.500 value:0.413 impurity:0.004
|---------------------- count:3 split:age<=35.000 value:0.437 impurity:0.005
|---------------------- count:3 split:age<=36.000 value:0.389 impurity:0.001
|------------------ count:1 split:N/A - Leaf node value:0.524 impurity:0.000
|-------------- count:1 split:N/A - Leaf node value:0.800 impurity:-0.000
|---------- count:1 split:N/A - Leaf node value:0.136 impurity:0.000

0 Karma

oda
Communicator

I'm sorry.
I could not understand what you wanted.
What can I cooperate with you?

0 Karma

ericchaucl
Path Finder

The "Decision Tree Summary" example shown in my post is from Splunk directly, using the command "| summary "

It is presented like a tree in text format, using "|----". Can simplify an example like this:

Decision Tree Summary
|-- Node A
|------ Leaf Node B (from A)
|------ Node C (from A)
|---------- Leaf Node D (from C)
|---------- Leaf Node E (from C)

Just wonder if there is there is any existing work done to convert these records into a more presentable graph.

0 Karma

oda
Communicator

I understand!
Thank you!
Unfortunately we can not find such a visualization at present.
There seems to be only processing by oneself.

0 Karma

ericchaucl
Path Finder

Well noted, thanks! Hopefully Splunk will consider this in future release of their Machine Learning Toolkit.

0 Karma

oda
Communicator

I also hope that visualization will increase a little more.
Can you accept or upvote if you do not mind?

0 Karma

ericchaucl
Path Finder

Would like to wait a few more days and see if there is additional suggestions from others. Let me upvote your answer first.

0 Karma

oda
Communicator

Thank you!
I hope there is a better proposal!

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...