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

https://github.com/yuhexiong/iris-classification-decision-tree-python


https://github.com/yuhexiong/iris-classification-decision-tree-python

cross-entropy decision-tree machine-learning python scikit-learn

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# Iris Classification Decision Tree

### DataSet From [Kaggle - Iris Species](https://www.kaggle.com/datasets/uciml/iris)

## Overview

- Language: Python v3.9.15
- Package: Scikit-Learn
- Model: Decision Tree
- Loss Function: Cross Entropy
- Max Depth: 5, Min Samples Leaf: 3

## Run

### Run code
```bash
python iris-classification-decision-tree.py
```

### Run streamlit

```bash
streamlit run iris-classification-decision-tree-app.py
```

server running at `http://localhost:8501`

## Data

![Streamlit Data](./image/streamlit_data.png)

## Data Distribution

![Streamlit Sepal](./image/streamlit_sepal_length_vs_width.png)

![Streamlit Petal](./image/streamlit_petal_length_vs_width.png)

## Correlation Matrix

![Streamlit Correlation Matrix](./image/streamlit_correlation_matrix.png)

## Confusion Matrix - Accuracy Rate 96.67%

![Streamlit Confusion Matrix](./image/streamlit_confusion_matrix.png)

## Tree Plot

![Streamlit Tree Plot](./image/streamlit_tree_plot.png)