ML4ITS / mtad-gat-pytorch

PyTorch implementation of MTAD-GAT (Multivariate Time-Series Anomaly Detection via Graph Attention Networks) by Zhao et. al (2020, https://arxiv.org/abs/2009.02040).
MIT License
328 stars 76 forks source link

Dataframe fragmentation warnings #24

Closed srigas closed 1 year ago

srigas commented 1 year ago

In the current form of the code, multiple dataframe fragmentation warnings spam the console every time the prediction.py module is called. This is because an empty dataframe is initialized and then populated with columns and values within for loop, which is considered a bad practice and also leads to the aforementioned fragmentation warnings. Using a dictionary object instead and afterwards defining the dataframe using the dictionary's contents resolves the problem.