Implementation
This section shows how to use an advanced version of naive Bayes and where to insert this component in the CRLMM described in Chapter 11, Conceptual Representation Learning.
Gaussian naive Bayes
In implementation mode, a dataset with raw data from the blockchain will be used without the feature interpretation function of naive Bayes in the following table:
DAY | STOCK | BLOCKS | DEMAND |
10 | 1455 | 78 | 1 |
11 | 1666 | 67 | 1 |
12 | 1254 | 57 | 1 |
14 | 1563 | 45 | 1 |
15 | 1674 | 89 | 1 |
10 | 1465 | 89 | 1 |
12 | 1646 | 76 | 1 |
15 | 1746 | 87 | 2 |
12 | 1435 | 78 | 2 |
Each line represents a block:
- DAY: The day of the month scanned (dd/mm/yyyy can be used beyond a prototype)
- STOCK: The total inputs in a given location (A, B, or... F) found in the blocks and totaled on that day
- BLOCKS: The number of blocks containing product P for location A, for example
A high number of blocks in the BLOCK column and a low number of quantities in the STOCK column mean that the demand is high.
- DEMAND = 1. The proof of demand is a transaction block that contains a purchase in the past. These transaction blocks...