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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...