Skip to content

Azure Databricks notebook sample to visualize and display Decision Tree model

Notifications You must be signed in to change notification settings

easonlai/decision-tree-sample

Repository files navigation

Azure Databricks notebook sample to visualize and display Decision Tree model

Update version 1.1

Two approach to visualize Decision Tree in Notebook & Azure Databricks Notebook.

  • Using Scikit model dot export and covert dot to png approach with Graphviz
  • Using Matplotlib to visualize decision tree and export to png approach

Contents

  • decision-tree-sample.ipynb <-- Notebook sample from Mac.
  • decision-tree-sample-databricks.ipynb <-- Notebook sample from Azure Databricks.
  • decision-tree-sample-databricks.html <-- HTML Export of Notebook sample from Azure Databricks.

Install Graphviz in Mac

brew install graphviz

Install Graphviz in Azure Databricks

%md
sudo apt install python-pydot -y
%md
sudo apt install python-pydot-ng -y
%md
sudo apt install graphviz -y

alt text

alt text