COMPLETE HISTORICAL DATA
                              │
                  Remove invalid duplicates
                  Define prediction moment
                              │
                              ▼
                        SPLIT THE DATA
                              │
           ┌──────────────────┼──────────────────┐
           │                  │                  │
           ▼                  ▼                  ▼
      TRAINING SET       VALIDATION SET       TEST SET
          70%                 15%                15%
           │                  │                  │
           │                  │             Keep sealed
           ▼                  │                  │
    Learn preprocessing       │                  │
    Learn model parameters    │                  │
           │                  │                  │
           └──────► Evaluate and tune             │
                              │                   │
                     Select final model           │
                              │                   │
                              └──────────────────►│
                                                  ▼
                                        ONE FINAL EVALUATION
                                                  │
                                                  ▼
                                      Production decision

Quality warning:

Wrong:
Split individual rows even though one customer has many rows.

Better:
Keep all rows belonging to one customer in one subset.

For chronological problems:

Past ─────────────────────────────────────────► Future

Training period → Validation period → Test period