The operational data of a certain sewage treatment plant for one year (see Data.csv) is provided in hourly time precision. The data includes rainfall intensity near the sewage treatment plant, inflow rate, COD concentration, and ammonia nitrogen concentration of the influent wastewater.
The whole dataset contains 8760 pieces of data. We fist sample them into 1000 sequense which contains the data and label.
And before the training, we normalize the data so that its size is between 0 and 1.
We use positional encoding and transformer model to predict.
And the model is transformer.
You can creat you own envirnment and run the code in the terminal:
pip install -r requirements.txt
You can run the following code directly for your training
bash run.sh
And you can change the hyperparameters in the run.sh
.
After trainig, you will get the model file ./model.pth
. Then you can run the predict.py
by
python predict.py
And you will get the result figure ./output.png
. Also, the output data can be found in ./output.txt
.
I also provide my trained file model.pth
, and you can directly run the predict.py
can get the result.