Linear regression: Programming exercise
Stay organized with collections
Save and categorize content based on your preferences.
In the following coding exercise, you'll build your own linear regression model
using the Keras library:
Programming exercises run directly in your browser (no setup
required!) using the Colaboratory
platform. Colaboratory is supported on most major browsers, and is most
thoroughly tested on desktop versions of Chrome and Firefox.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThis exercise focuses on building a linear regression model using the Keras library to predict values.\u003c/p\u003e\n"],["\u003cp\u003eThe coding exercise utilizes Google Colaboratory, a platform that allows you to run code directly in your browser without any setup.\u003c/p\u003e\n"],["\u003cp\u003eColaboratory is compatible with most browsers but works best with desktop versions of Chrome and Firefox.\u003c/p\u003e\n"],["\u003cp\u003eUsers can find more support and information on the Google Machine Learning Education Help Center.\u003c/p\u003e\n"]]],[],null,["# Linear regression: Programming exercise\n\nIn the following coding exercise, you'll build your own linear regression model\nusing the [Keras](https://keras.io/) library: \n[Open linear regression exercise](https://colab.research.google.com/github/google/eng-edu/blob/main/ml/cc/exercises/linear_regression_taxi.ipynb?utm_source=mlcc&utm_campaign=colab-external&utm_medium=referral&utm_content=linear_regression)\n\nProgramming exercises run directly in your browser (no setup\nrequired!) using the [Colaboratory](https://colab.research.google.com)\nplatform. Colaboratory is supported on most major browsers, and is most\nthoroughly tested on desktop versions of Chrome and Firefox. \n[Help Center](https://support.google.com/machinelearningeducation)"]]