Building a model in NumPy
In this section, we are going to build a basic mathematical model to demonstrate the power that NumPy has apart from speed. We are going to use matrices to make a simple model. To achieve this, we will have to carry out the following steps:
- Define our model.
- Build a Python object that executes our model.
Let's look at these steps in detail in the following subsections.
Defining our model
A mathematical model is essentially a set of weights that calculate an outcome based on inputs. Before we go any further, we must remember the scope of this book. We are building a model to demonstrate how to utilize NumPy. If we covered the nuances of mathematical modeling, that would take up the whole book. We will be building a model based on the example discussed in the previous section, but this does not mean that the model defined is an accurate description of the complexity of mathematical modeling. Here are the steps we need to take...