Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Machine Learning on Google Cloud Platform

You're reading from   Hands-On Machine Learning on Google Cloud Platform Implementing smart and efficient analytics using Cloud ML Engine

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788393485
Length 500 pages
Edition 1st Edition
Arrow right icon
Authors (3):
Arrow left icon
Alexis Perrier Alexis Perrier
Author Profile Icon Alexis Perrier
Alexis Perrier
V Kishore Ayyadevara V Kishore Ayyadevara
Author Profile Icon V Kishore Ayyadevara
V Kishore Ayyadevara
Giuseppe Ciaburro Giuseppe Ciaburro
Author Profile Icon Giuseppe Ciaburro
Giuseppe Ciaburro
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Introducing the Google Cloud Platform 2. Google Compute Engine FREE CHAPTER 3. Google Cloud Storage 4. Querying Your Data with BigQuery 5. Transforming Your Data 6. Essential Machine Learning 7. Google Machine Learning APIs 8. Creating ML Applications with Firebase 9. Neural Networks with TensorFlow and Keras 10. Evaluating Results with TensorBoard 11. Optimizing the Model through Hyperparameter Tuning 12. Preventing Overfitting with Regularization 13. Beyond Feedforward Networks – CNN and RNN 14. Time Series with LSTMs 15. Reinforcement Learning 16. Generative Neural Networks 17. Chatbots

Cart-Pole system

The Cart-Pole system is a classic problem of reinforced learning. The system consists of a pole (which acts like an inverted pendulum) attached to a cart via a joint, as shown in the following figure:

The system is controlled by applying a force of +1 or -1 to the cart. The force applied to the cart can be controlled, and the objective is to swing the pole upwards and stabilize it. This must be done without the cart falling to the ground. At every step, the agent can choose to move the cart left or right, and it receives a reward of 1 for every time step that the pole is balanced. If the pole ever deviates by more than 15 degrees from upright, then the procedure ends.

To run the Cart-Pole example using the OpenAI Gym library, simply type the following code:

import gym
env = gym.make('CartPole-v0')
env.reset()
for i in range(1000):
env.render()
env...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime