2

Does there exist a functionality to implement a decision-tree like interactive element in R Shiny? (By ' decision-tree' I mean something like this :) ).

I expect a tree to be quite 'branched' in my case and I wish I am able to present only a part of it (e.g. nodes, their parents [with siblings] and their children), allowing user to move it 'up/down' interactively.

Any ideas? Thank you a lot for any hint in advance!

Marta Karas
  • 4,967
  • 10
  • 47
  • 77

1 Answers1

2

I looked around for something like this a while back and didn't find anything in R. However, D3.js offers very nice interactive visualizations that could be used. There seems to be some work on this that starts with python (see below). Creating bindings to js libraries is probably best done with https://github.com/ramnathv/htmlwidgets. It would be great to have a tool for decision-analysis in R. Keep me posted (https://github.com/mostly-harmless).

http://bl.ocks.org/pprett/raw/3813537/

https://gist.github.com/pprett/3813537

how to explain the decision tree from scikit-learn

http://www.garysieling.com/blog/rending-scikit-decision-trees-d3-js

Community
  • 1
  • 1
Vincent
  • 5,063
  • 3
  • 28
  • 39
  • Thank you so much for your answer, Vincent! I believe the implementation from the http://bl.ocks.org/pprett/raw/3813537/ is sufficient enough. Greetings! – Marta Karas Nov 08 '14 at 14:29
  • 1
    If you create something (in R) please let me know how it goes. This is something that would be of value to quite a few users I think – Vincent Nov 08 '14 at 20:30