TensorFlow.js Pretrained model

GitHub Repository

The dataset used for this example is the “Pima Indians Diabetes Database” dataset.

The features contained in this dataset are:

  1. Pregnancies: Number of times pregnant
  2. GlucosePlasma: glucose concentration a 2 hours in an oral glucose tolerance test
  3. BloodPressure: blood pressure (mm Hg)
  4. SkinThickness: skin fold thickness (mm)
  5. Insulin2-Hour: serum insulin (mu U/ml)
  6. BMIBody: mass index (weight in kg/(height in m)^2)
  7. DiabetesPedigreeFunction: pedigree function
  8. Age: Age in years

And the label column (called Outcome) identifies if someone suffers or not of Diabetes (268 of 768 cases are 1, the others are 0). This dataset is available to download here.

For this example, I first trained a model using Tensorflow Eager Execution (executes operations immediately, without building graphs: operations return concrete values instead of constructing a computational graph to run later) to create a Multi Layer Perceptron in Python. Finally, I saved this trained model and deploy it online at this page ready to make predictions. The Python script I used to create this model is available here.

You can use the buttons below to open or close the online Machine Learning model window as you wish.

Contacts

If you want to keep updated with my latest articles and projects follow me on Medium and subscribe to my mailing list. These are some of my contacts details:

Buy Me A Coffee

Subscribe to my Data Blog Newsletter to get news about Data, Cloud and my website!

* indicates required