We will use matrix notation most of the time
10 min
parameters of the model
, but we do not know whether this prediction is valid
has only one row or column
transposed vector
5 minutes
Water | Glucose | Vitamins | |
---|---|---|---|
Sample 1 | 100 g | 10 g | 1 g |
Sample 2 | 70 g | 20 g | 2 g |
Sample 3 | 90 g | 10 g | 1 g |
Water | Glucose | Vitamins | |
---|---|---|---|
Caloric density | 0 kcal/ g | 4kcal/ g | 0 kcal/ g |
Price | 0 €/ g | 0.02 €/ g | 0.10 €/ g |
Caloric energy of Sample 1
We could write a for
-loop!
Caloric energy
Task
Price
5 minutes
Price
even more convenient:
You will be able to
numpy
provides a data structure for matrices45 minutes
Equation I can be written as
Equation II: can be written as
We can rewrite this system in matrix form
Equation I:
Equation II:
there is no solution
You want to create a new growth medium on industrial scale.
You base the the new medium on two existing products (A and B).
You want to create 400 kg of the new mixture.
Component A costs 18 €. Component B costs 22 €.
How much (kg) of A and B do You need, if the new mixture should cost 19,50 €?
First, create two formulas by what You know. Then reformulate them as a matrix multiplication and solve them using numpy.