Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/easonlai/decision-tree-sample

Azure Databricks notebook sample to visualize and display Decision Tree model
https://github.com/easonlai/decision-tree-sample

azure azuredatabricks databricks decision-tree decision-trees graphviz graphviz-dot graphviz-viewer jupyter-notebook matplotlib matplotlib-pyplot notebook scikit-learn

Last synced: 8 days ago
JSON representation

Azure Databricks notebook sample to visualize and display Decision Tree model

Awesome Lists containing this project

README

        

# 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
```shell
brew install graphviz
```

## Install Graphviz in Azure Databricks
```shell
%md
sudo apt install python-pydot -y
```

```shell
%md
sudo apt install python-pydot-ng -y
```

```shell
%md
sudo apt install graphviz -y
```

![alt text](https://github.com/easonlai/decision-tree-sample/blob/main/git-images/git-image-1.png)

![alt text](https://github.com/easonlai/decision-tree-sample/blob/main/git-images/git-image-2.png)