Getting ready

This recipe will illustrate how to solve a system of ordinary differential equations (ODEs). We can use similar methods to the previous two sections to update values as we iterate through and solve an ODE system.

The ODE system we will consider is the famous Lotka-Volterra predator-prey system. This system shows how a predator-prey system can be oscillating, given specific parameters.

The Lotka-Volterra system was published in a paper in 1920 (see also Figure 1, The scalar value, our slope estimate, visualized in tensorboard). We will use similar parameters to show that an oscillating system can occur. Here is the system represented in a mathematically discrete way:

Here, X is the prey and Y will be the predator. We determine ...

Get TensorFlow Machine Learning Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.