=====================================================================================
  PERCEPTRON FROM SCRATCH
  Didactic Python code · Kardex Tauro · kardex-tauro.muisca.co
=====================================================================================
Products read: 12
Inputs of the neuron: 3 (columns monthly_sales, stock, supplier_lead_time)

DATA IN THE FILE (exactly as the CSV brings it)
-------------------------------------------------------------------------------------
Product                         Reorder       Sales month         Stock     Lead time
-------------------------------------------------------------------------------------
Gray cement 50 kg               YES                   120            40            21
THHN 12 AWG wire                NO                    300           260            10
Self-drilling screw 1 in        YES                   400            90             9
Anti-rust paint gallon          NO                     35            60            12
Ball-peen hammer                YES                    20             9            26
PVC pipe 1/2 in (6 m)           YES                    80            25            10
Clear silicone                  YES                   150            30             8
Leather work gloves             NO                     90           140            16
HSS drill bit 1/4 in            YES                    60            15            14
Coarse sand (bag)               NO                    200           320             5
Insulating tape                 YES                   250            50             9
Padlock 40 mm                   NO                     30            95            22
-------------------------------------------------------------------------------------

SCALED DATA (0 to 1: what the neuron sees)
-------------------------------------------------------------------------------------
Product                         Reorder         Sales 0-1     Stock 0-1      Lead 0-1
-------------------------------------------------------------------------------------
Gray cement 50 kg               YES                  0.26          0.10          0.76
THHN 12 AWG wire                NO                   0.74          0.81          0.24
Self-drilling screw 1 in        YES                  1.00          0.26          0.19
Anti-rust paint gallon          NO                   0.04          0.16          0.33
Ball-peen hammer                YES                  0.00          0.00          1.00
PVC pipe 1/2 in (6 m)           YES                  0.16          0.05          0.24
Clear silicone                  YES                  0.34          0.07          0.14
Leather work gloves             NO                   0.18          0.42          0.52
HSS drill bit 1/4 in            YES                  0.11          0.02          0.43
Coarse sand (bag)               NO                   0.47          1.00          0.00
Insulating tape                 YES                  0.61          0.13          0.19
Padlock 40 mm                   NO                   0.03          0.28          0.81
-------------------------------------------------------------------------------------

TRAINING: 30 epochs, rate 0.10, seed 7
  Epoch 1/30 · errors 7
  Epoch 2/30 · errors 5
  Epoch 3/30 · errors 4
  Epoch 4/30 · errors 2
  Epoch 6/30 · errors 0

FINAL WEIGHTS AND BIAS (read in words)
  weight of monthly_sales = 0.25: the more the product sells, the more reason to reorder
  weight of stock = -0.74: the more stock on hand, the less reason to reorder
  weight of supplier_lead_time = 0.28: the longer the supplier takes, the more reason to reorder
  bias = -0.06: with all three inputs at zero, the neuron leans towards not reordering

PREDICTION PRODUCT BY PRODUCT
-------------------------------------------------------------------------------------
Product                         Hit              Expected     Predicted         Score
-------------------------------------------------------------------------------------
Gray cement 50 kg               YES                     1             1          0.15
THHN 12 AWG wire                YES                     0             0         -0.40
Self-drilling screw 1 in        YES                     1             1          0.05
Anti-rust paint gallon          YES                     0             0         -0.07
Ball-peen hammer                YES                     1             1          0.23
PVC pipe 1/2 in (6 m)           YES                     1             1          0.01
Clear silicone                  YES                     1             1          0.02
Leather work gloves             YES                     0             0         -0.17
HSS drill bit 1/4 in            YES                     1             1          0.08
Coarse sand (bag)               YES                     0             0         -0.68
Insulating tape                 YES                     1             1          0.05
Padlock 40 mm                   YES                     0             0         -0.02
-------------------------------------------------------------------------------------
Hits: 12 of 12 (100.00 %)
Check (same seed, same result): TIES
File written: salida/predicciones.csv
