Downloads · 30 days
0
AnaFaGha/XAI-for-TimeSeries-Using-Attention
XAI-for-TimeSeries-Using-Attention is a machine learning model from AnaFaGha. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
In this repository, we provide a framework for time series classification explanation. 1. We have applied wavelet feature extraction on wind turbine data to find the frequency-time related features. (This step can be…
Downloads · 30 days
0
Access
Public
Updated Oct 30, 2025
Repo size
1.3 GB
Likes
0
Public
Click a slice to open those files.
.pickle765 MB · 57%
From the Hugging Face model README
In this repository, we provide a framework for time series classification explanation.

• Install the requirements file. We have used Python 3.10.12. For other Python versions, maybe packages need to be adapted.<br> • You need to run only the main.py file.<br> • After running main.py file, we will obtain the classification results as csv files. Furthermore, attention data will be stored in the explanation folder. After the main.py file has been running, you can run the attention_explanation.py to find the important features that helped the transformer to classify your samples. (We have already stored an example of attention data in the explanation folder that you can use.)<br>
• There are some general parameters: Learning rate, epochs, n_heads, n_layes, window size, optimizer, batch-size, …<br> • We have used wavelet feature extraction: we can also set frequency range and wavelet_type.
[1] S. Sheng, ‘‘Wind turbine gearbox vibration condition monitoring benchmarking datasets,’’ NREL National Wind Technology Center, Boulder, CO, Report No. NREL/TP-5000-54530, 2012.<br> [2] D. Zappala, N. Sarma, S. Djurović, C. Crabtree, A. Mohammad, and P. Tavner, ‘‘Electrical & mechanical diagnostic indicators of wind turbine induction generator rotor faults,’’ Renewable energy, vol. 131, pp. 14–24, 2019.<br> [3] A. Mostafavi and A. Friedmann, ‘‘Wind turbine condition monitoring dataset of Fraunhofer LBF,’’ Scientific data, vol. 11, no. 1, p. 1108, 2024.