March 2020
Beginner to intermediate
342 pages
8h 38m
English
If we run the program, we get this output:
| | Iteration 0 => Loss: 1333.56666666666660603369 |
| | Iteration 1 => Loss: 152.37148173674077611395 |
| | … |
| | Iteration 99999 => Loss: 6.69817817063803833122 |
| | |
| | Weights: [[ 2.41178207 1.23368396 -0.02689984 3.12460558]] |
| | |
| | A few predictions: |
| | X[0] -> 45.8717 (label: 44) |
| | X[1] -> 23.2502 (label: 23) |
| | X[2] -> 28.5192 (label: 28) |
| | X[3] -> 58.2355 (label: 60) |
| | X[4] -> 42.8009 (label: 42) |
First, look at the loss. As we expected, it’s lower than the one that we got without a bias.
The weights are interesting in their own right. The first weight is actually the bias, which we turned into a regular weight with the “column of ones” trick. The remaining weights match the three input variables—reservations, ...
Read now
Unlock full access