Font Size: a A A

Research On Air Quality Prediction Based On Machine Learning

Posted on:2021-02-10Degree:MasterType:Thesis
Country:ChinaCandidate:C ShiFull Text:PDF
GTID:2491306470466294Subject:Software engineering
Abstract/Summary:
Air quality is closely related to people’s happiness index and health.However,with the rapid development of industrialization and the rapid expansion of cities and towns in China in recent decades,environmental problems have become prominent.Many areas are suffering from serious air pollution.Millions of respiratory diseases are caused by poor air quality.Therefore,the scientific analysis and accurate prediction of air quality become the necessary conditions for decision-making departments and related groups to take preventive measures and prevent diseases in advance.Air pollutant concentration is a time and space related sequence,which not only has time correlation in the sequence,but also has a certain dependence between the sequences.The application of machine learning method based on mathematical statistics to air quality prediction needs complex feature engineering,and the accurate prediction of air quality still faces great challenges.Thanks to the development of deep neural network,the method based on neural network has a good effect in dealing with a variety of nonlinear complex tasks.However,the application of deep learning method in air quality prediction has its limitations.First,it is similar to convolutional neural network(CNN)or recurrent neural network(RNN)Network)method can not adapt to different sequence length in input or output with one model;secondly,using sequence to sequence model directly will lead to the problem that the prediction performance will decline with the prediction time.In order to improve the prediction effect,based on the framework of seq2 seq model,this paper proposes a new air quality prediction method,which is as follows:First,this paper proposes an attention mechanism based air quality predictor(AMAQP)to improve the prediction effect of seq2 seq.Firstly,attention mechanism is introduced into the decoding phase of AMAQP to calculate the context vector.The attention mechanism learns the weight distribution strategy of the original data and integrates all the coding states into the context vector to further enhance the representation ability of time characteristics.Secondly,in order to solve the problem that RNN is difficult to train,easy to produce gradient explosion or gradient disappearance in encoder and decoder,this paper uses long-term memory network(LSTM)as the module of encoder and decoder to replace the original RNN structure,so as to better deal with the problem of long-term dependence.In addition,the influence of different loss functions on the model is also tested.Three different loss functions are applied to the training of the model.The results show that the accuracy of air quality prediction can be improved by using attention mechanism,and the performance of AMAQP can be further improved by selecting appropriate loss function.Secondly,this paper proposes MSAQP model to solve the problems of slow training speed of seq2 seq using attention mechanism and the decline of prediction performance over time.This model uses self-attention mechanism and position coding as encoder and decoder.Self-attention mechanism can complete the encoding and decoding neural network of sequence without relying on RNN,which is different from the common attention mechanism.Self-attention mechanism can learn the correlation among many factors in the atmosphere adaptively,and can acquire the global information in one step.Due to the large number of operations of attention mechanism,the training time of the model becomes longer.In this paper,the multi-step recursive output strategy is used to predict multiple time steps at a time,reduce the error accumulation caused by recursive prediction and improve the training speed.Experiments show that the training speed of MSAQP is close to seq2 seq.In addition,the self-attention mechanism can make full use of the sequence information,and there is no significant decline in the prediction ability when the prediction time is longer.It is superior to SVM,LSTM,GRU and other mainstream prediction models in Mae and R_squared evaluation indexes,thus achieving high accuracy in the prediction of PM2.5 concentration in the next 24 hours in Beijing,and providing data for government departments and citizens to travel support.
Keywords/Search Tags:air quality prediction, time series, LSTM, Seq2Seq, attention mechanism
Related items