Source code and data of a Test-Driven XAI Methodology for Time-Series Forecasting using TSAP and Tailored Transformations
Description
The source code of “TddWithTsap.zip” contains the implemented tailored transformations following this test-driven explainable AI (XAI) methodology for time-series forecasting using TSAP (Time Series Additive explainer) and other related methodologies in files such as “tdd_transformations.py” and “VibeCoding.py” inside “tsap” folder. Examples of tests are included in “tdd_test.py” inside the same folder. The experiments on live market have been performed by running and changing “RealTimeExperimentation.py” by each investor, available in the same folder. The collected raw data of live market experimentations are included in “LiveMarketExperimentsAllParticipants.xlsx”. The data in SPSS format is included in “LiveMarketAll.sav” and the output of “LiveMarketAll.sav”. To facilitate the access to a broader audience, we have also included the same data in CSV format in the file “LiveMarketExperimentsAllParticipants.csv” The purpose of this dataset is to support the work presented in an article to be submitted soon to scientific journal.
Files
Steps to reproduce
After downloading the dataset, unzip the file “TddWithTsap.zip and open “tsap” folder with your Python environment such as VisualCode. You can run files such as “PlausabilityV2.py” and “GummadiEvaluation.py” to assess some metrics that can be automatically calculated. Real-time experiments require running “RealTimeExperimentation.py” and use this approach for executing different time-series models such as different configurations of LSTM or GRU, wait for the explanations, and choose which model is more trustable and use this output to perform real-time intraday operations. We highly recommend not using real money in the operations to avoid risking having losses. The different case studies can be executed with the files “CaseStudyElectric.py”, “CaseStudyStock.py” and “CaseStudyTraffic.py”.
Categories
Funders
- Agencia Estatal de InvestigaciónMinisterio de Ciencia, Innovación y UniversidadesMadrid, MadridGrant ID: PID2025-168174OB-I00 (MICIU/AEI/10.13039/501100011033)