five

Source code of TSAP: Time-Series Additive exPlanations, a novel explainer based on time-series transformations

收藏
NIAID Data Ecosystem2026-05-10 收录
下载链接:
https://data.mendeley.com/datasets/v8mb6thhwh
下载链接
链接失效反馈
官方服务:
资源简介:
This dataset contains the complete Python source code of Time-Series Additive exPlanations (TSAP), a novel model-agnostic explainer designed for time-series (TS) machine learning (ML) models. TSAP is based on measuring the impact of controlled TS transformations on the predicted output of forecasting models. The core component of the framework is the class "TsapExplainer", which can be applied to any TS ML model implementing the basic interface "TsModel" (provided as a Python class). The only required method is "predict", which receives a Pandas Series as input and returns a numerical value corresponding to the predicted next value of the series. This design enables compatibility with external ML libraries such as Keras or TensorFlow by implementing a lightweight wrapper class that conforms to the "TsModel" interface and defines the required method. To illustrate the use of TSAP, this dataset includes the class “LstmKeras”, which implements a Long Short-Term Memory (LSTM) neural network using Keras. Its two subclasses, “LstmFromCsv” and “LstmStock”, demonstrate its application when using data from a CSV file and when retrieving financial time-series data through the Yahoo Finance application programming interface (API), respectively. The class “GruTsModel” provides an example of a Gated Recurrent Unit (GRU) network analyzed with the TSAP explainer, illustrating that TSAP is model-agnostic and can be applied to different models. TSAP supports both local and global explanations. Local explanations analyze the influence of TS transformations on a single prediction, while global explanations characterize the overall behavior of a model based on a group of TS instances. Additional classes and scripts included in the dataset are used for experimentation such as the evaluation with Gummadi’s metrics and perturbation faithfulness. These materials were prepared to support the peer-review process of a scientific publication. Although the current version of TSAP includes default transformations related to trend and volatility, the framework is fully extensible. The explainer can receive custom transformation functions as parameters, allowing practitioners to define domain-specific transformations and generate explanations tailored to their particular TS ML models. Researchers and practitioners are encouraged to cite the associated publications and this dataset when using TSAP in academic or professional work.
创建时间:
2026-03-10
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作