Edit model card

Tensorflow Keras Implementation of Structured data classification from scratch

This repo contains models and notebook for Structured data classification from scratch.
This example demonstrates how to do structured data classification, starting from a raw CSV file. Our data includes both numerical and categorical features. We will use Keras preprocessing layers to normalize the numerical features and vectorize the categorical ones.
Full credits to François Chollet, creator of Keras!

Model description

The model is a very simple MLP with only one hidden layer. This example showcases how to perform preprocessing of common tabular data inside a Keras model. It uses tensorflow.keras.layers.{IntegerLookup, Normalization, StringLookup} to process numerical and categorical (integer or string) features.

Intended uses & limitations

This tool does not provide medical advice It is intended for informational purposes only. It is not a substitute for professional medical advice, diagnosis or treatment.

Training and evaluation data

Our dataset is provided by the Cleveland Clinic Foundation for Heart Disease. It's a CSV file with 303 rows. Each row contains information about a patient (a sample), and each column describes an attribute of the patient (a feature). We use the features to predict whether a patient has a heart disease (binary classification). The model is trained on 80% of data and evaluated on remaining 20%.

Training procedure

Training proceeds for 50 epochs with default Adam optimizer on binary crossentropy.

Training hyperparameters

The following hyperparameters were used during training:

  • optimizer: {'name': 'Adam', 'learning_rate': 0.001, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
  • training_precision: float32

Training Metrics

Training achieves >83% accuracy on the held-out validation data. Check TensorBoard "Metrics" tab above for details.

Model Plot

View Model Plot

Model Image

Downloads last month
Hosted inference API

Unable to determine this model’s pipeline type. Check the docs .

Spaces using keras-io/structured-data-classification