/keras-wine-model

Model built with the Keras Functional API

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

This is not an official Google product.

Building a wide & deep model with the Keras Functional API

This model takes a wine's description and variety (Pinot Noir, Chardonnay, etc.) as input and predicts the price of the wine. It's built with tf.keras using the Functional Model API. Here's an example input and prediction:

Inputs

  • Description: This tremendous 100% varietal wine hails from Oakville and was aged over three years in oak. Juicy red-cherry fruit and a compelling hint of caramel greet the palate, framed by elegant, fine tannins and a subtle minty tone in the background. Balanced and rewarding from start to finish, it has years ahead of it to develop further nuance. Enjoy 2022–2030

  • Variety: Cabernet Sauvignon

Prediction

  • Price - $235

Training the model

You can run the model live in Colab with zero setup here.

To run it locally, make sure you have TensorFlow, Pandas, and Jupyter installed.

I've included the model code as a Jupyter notebook (keras-wide-deep.ipynb). From the root directory run jupyter notebook to start your notebook. Then navigate to localhost:8888 and click on keras-wide-deep.ipynb.

The data used for training this model is from Kaggle. A CSV of the data is available here.