Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Python Machine Learning By Example
  • Toc
  • feedback
Python Machine Learning By Example

Python Machine Learning By Example

By : Yuxi (Hayden) Liu
4.9 (9)
close
Python Machine Learning By Example

Python Machine Learning By Example

4.9 (9)
By: Yuxi (Hayden) Liu

Overview of this book

The fourth edition of Python Machine Learning By Example is a comprehensive guide for beginners and experienced machine learning practitioners who want to learn more advanced techniques, such as multimodal modeling. Written by experienced machine learning author and ex-Google machine learning engineer Yuxi (Hayden) Liu, this edition emphasizes best practices, providing invaluable insights for machine learning engineers, data scientists, and analysts. Explore advanced techniques, including two new chapters on natural language processing transformers with BERT and GPT, and multimodal computer vision models with PyTorch and Hugging Face. You’ll learn key modeling techniques using practical examples, such as predicting stock prices and creating an image search engine. This hands-on machine learning book navigates through complex challenges, bridging the gap between theoretical understanding and practical application. Elevate your machine learning and deep learning expertise, tackle intricate problems, and unlock the potential of advanced techniques in machine learning with this authoritative guide.
Table of Contents (18 chapters)
close
16
Other Books You May Enjoy
17
Index

Solving the FrozenLake environment with dynamic programming

We will focus on the policy-based and value-based dynamic programming algorithms in this section. But let’s start by simulating the FrozenLake environment. It simulates a simple grid-world scenario where an agent navigates through a grid of icy terrain, represented as a frozen lake, to reach a goal tile.

Simulating the FrozenLake environment

FrozenLake is a typical OpenAI Gym (now Gymnasium) environment with discrete states. It is about moving the agent from the starting tile to the destination tile in a grid, and at the same time avoiding traps. The grid is either 4 * 4 (FrozenLake-v1), or 8 * 8 (FrozenLake8x8-v1). There are four types of tiles in the grid:

  • The starting tile: This is state 0, and it comes with 0 reward.
  • The goal tile: It is state 15 in the 4 * 4 grid. It gives +1 reward and terminates an episode.
  • The frozen tile: In the 4 * 4 grid, states 1, 2, 3, 4, 6, 8, 9, 10, 13...
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete