O'Reilly logo

Scala Machine Learning Projects by Md. Rezaul Karim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

QLearning model creation and training

The QLearning class encapsulates the Q-learning algorithm, more specifically the action-value updating equation. It is a data transformation of type ETransform (we will see this later on) with an explicit configuration of type QLConfig. This class is a generic parameterized class that implements the QLearning algorithm. The Q-learning model is initialized and trained during the instantiation of the class so it can be in the correct state for runtime prediction.

Therefore, the class instances have only two states: successfully trained and failed training (we'll see this later).

The implementation does not assume that every episode (or training cycle) will be successful. At the completion of training, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required