TensorFlow.js Layers: Iris Demo

Classify structured (tabular) data with a neural network.


This example uses a neural network to classify tabular data representing different flowers. The data used for each flower are the petal length and width as well as the sepal length and width. The goal is to predict what kind of flower it is based on those features of each data point. The data comes from the famous Iris flower data set.


Using the buttons below you can either train a new model from scratch or load a pre-trained model and test its performance.

If you train a model from scratch you can also save it to browser local storage.

If you load a pre-trained model you can edit the properties in first row of "Test Examples" to generate a prediction for those data points.


Train Model

Learning Rate:

Save/Load Model

Status unavailable.


Standing by.

Training Progress



Confusion Matrix (on validation set)

Test Examples

Petal length Petal width Sepal length Sepal width True class Predicted class Class Probabilities