Gist f2b16fc0ccd955514d00fbf44683516f
✓ Published0🌍 Public
YYannael
Last edited May 26, 2021
Created on May 26, 2021
This example demonstrates a temporal split of simulated financial transaction data into training and test sets for fraud detection. The code loads transaction records spanning from July 25 to August 14, 2018, then partitions them into three consecutive seven-day windows: training, delay, and test periods. It uses the custom `read_from_files` function to ingest the data and `get_train_test_set` to perform the split, while counting fraudulent transactions with the `TX_FRAUD` column. The visualization relies on Pandas DataFrames and Python’s `datetime` module to manage the time-based segmentation.
AI-generated description