CN111882033B - Keras-based regional civil aviation main passive carbon emission prediction method - Google Patents

Keras-based regional civil aviation main passive carbon emission prediction method Download PDF

Info

Publication number
CN111882033B
CN111882033B CN202010679105.XA CN202010679105A CN111882033B CN 111882033 B CN111882033 B CN 111882033B CN 202010679105 A CN202010679105 A CN 202010679105A CN 111882033 B CN111882033 B CN 111882033B
Authority
CN
China
Prior art keywords
model
training
function
carbon emission
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010679105.XA
Other languages
Chinese (zh)
Other versions
CN111882033A (en
Inventor
胡荣
朱昶歆
刘博文
张军峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Aeronautics and Astronautics
Original Assignee
Nanjing University of Aeronautics and Astronautics
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Aeronautics and Astronautics filed Critical Nanjing University of Aeronautics and Astronautics
Priority to CN202010679105.XA priority Critical patent/CN111882033B/en
Publication of CN111882033A publication Critical patent/CN111882033A/en
Application granted granted Critical
Publication of CN111882033B publication Critical patent/CN111882033B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/40Business processes related to the transportation industry

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Marketing (AREA)
  • Biophysics (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a Keras-based regional civil aviation main passive carbon emission prediction method, and belongs to the field of civil aviation carbon emission prediction. The method comprises the following steps: 1) Determining a comprehensive index system of passive carbon emission of the civil aviation main of the coverage area in the aspects of geographic position, social economy and civil aviation transportation; 2) Collecting all index values in the area, establishing a data set, and dividing the data set into a training set and a testing set; 3) Constructing a neural network model comprising an input layer, a full connection layer and an output layer based on a Keras framework; 4) Constructing a loss function and an optimization function by using an API of a Keras framework called by Python, training a neural network model on a training set, completing model parameter optimization by using a test set, and finally outputting and storing the structure and the weight of the model; 5) And according to each index data of the future region, the model is used for predicting the active and passive carbon emission of the region. The method improves the richness and accuracy of the carbon emission prediction result, and provides theoretical support for carrying out civil aviation carbon emission reduction work.

Description

Keras-based regional civil aviation main passive carbon emission prediction method
Technical Field
The invention relates to a Keras-based regional civil aviation main passive carbon emission prediction method, and belongs to the field of civil aviation carbon emission prediction.
Background
Civil aviation carbon emissions are widely available, with aircraft being the main body of the emissions. Therefore, reducing carbon emissions from aircraft is a central task in achieving green development in civil aviation. Before the carbon reduction, detailed knowledge of the carbon emission of civil aviation is needed, which requires the related departments to establish a carbon emission list of civil aviation, and the system grasps the current situation and trend of carbon emission of civil aviation. Considering the specificity of the civil aircraft running across the region and the pertinence of effective lifting emission reduction measures, the civil aircraft carbon emission in a certain region is divided into active carbon emission (namely carbon emission generated in the region in the LTO (Landing and Take-off) and CCD (climbs cruise and approach) stages of taking off and Landing in the region) and passive carbon emission (namely carbon emission in the CCD stage of the rest flight across the region), so that more reasonable and targeted emission reduction targets can be proposed to achieve the ideal emission reduction effect. Therefore, the prediction of the regional civil aviation main passive carbon emission can provide support for more accurately carrying out civil aviation carbon emission reduction work.
The most common prediction methods such as linear regression, neural networks, random forests and the like are usually used, and the linear regression method needs to judge whether the input and the output are in a linear relation or not before use and has higher limitation; the neural network can make up the defect better, and the common BP (Back propagation) neural network can realize prediction but has slow fitting speed and insufficient precision, so that the prediction result can not meet the ideal standard; random forest methods involve complex parameters and slow model training and prediction speeds. The neural network based on the Keras framework can better meet the requirements of precision, speed, active and passive emission distinction and the like in civil aviation carbon emission prediction. Keras is a deep learning framework based on Theano (machine learning library), also a high-level neural network API (Application Programming Interface, application program interface), whose design references Torch (deep learning framework), further encapsulates TensorFlow (symbolic math System based on data stream programming) written in Python (computer programming language).
Disclosure of Invention
In order to solve the defects that the prior regional civil aviation emission prediction does not distinguish active and passive carbon emission, the prediction precision is low, the calculation speed is low and the like, the invention provides a regional civil aviation active and passive carbon emission prediction method based on Keras, a comprehensive index system of the regional civil aviation active and passive carbon emission of the influence region such as geographic position of a coverage region, social economy, civil aviation transportation and the like is determined, a data set is built by collecting and preprocessing specific numerical values of each index in the region, the data set is divided into a training set and a testing set, a neural network model is built based on a Keras framework, an API construction loss function and an optimization function of the Keras framework are called by using Python the Keras framework, the neural network model is trained on the training set, the testing set is tested, each parameter of the model is optimized and determined, and the structure and weight of the neural network are finally output and saved. And according to the index data of the future region, the model can be used for predicting the active and passive carbon emission of the future region.
The invention adopts the following technical scheme for solving the technical problems:
a Keras-based regional civil aviation main passive carbon emission prediction method comprises the following steps:
(1) Determining a comprehensive index system of passive carbon emission of the civil aviation main of the coverage area in the aspects of geographic position, social economy and civil aviation transportation;
(2) Collecting and preprocessing specific values of each index in the region to establish a data set, and dividing the data set into a training set and a testing set;
(3) Constructing a neural network model comprising an input layer, a full-connection layer and an output layer based on a Keras framework, and setting the number of neurons and an activation function of each layer;
(4) Constructing a loss function and an optimization function by using an API of a Keras framework called by Python, training a neural network model on a training set, optimizing model parameters by using a test set, and finally outputting and storing the structure and weight of the neural network;
(5) And according to each index data of the future region, using the trained neural network model to predict the active and passive carbon emission of the future region.
The comprehensive index system for influencing regional civil aviation active and passive carbon emission in the step (1) comprises a geographic position, socioeconomic performance, civil aviation transportation and an active and passive emission label, wherein the geographic position index comprises regional center longitude and latitude coordinates and regional area, the socioeconomic performance index comprises population, GDP total amount and human GDP, the civil aviation transportation index comprises regional civil airport number, lifting and landing times, passenger throughput and goods mail throughput, the active and passive carbon emission label comprises an active emission label and a passive emission label, the active emission label refers to a carbon emission distinguishing label generated in a region in the lifting and cruising stage of flights in the region, and the passive emission label refers to a carbon emission distinguishing label of a CCD stage of flights flying over the region.
The specific process of the step (2) is as follows:
establishing a data set corresponding to the data of each index of the collection area, and preprocessing the data set in a standard normalization mode:
wherein x is * For the processed sample data, x is the original sample data, mu is the average value of the sample data, and delta is the standard deviation of the sample data;
dividing the data set into a training set and a testing set, wherein the dividing method comprises the following steps:
train_test_spilt(*arrays,test_size,random_state)
wherein, train_test_space () is a data set dividing function, array is a data set, test_size is the ratio of the number of test set samples to the total number of data sets, and test_size e [0,1], random_state is a random seed.
The specific process of constructing the neural network model comprising the input layer, the full-connection layer and the output layer based on the Keras framework in the step (3) is as follows:
a Sequential model was built using model=sequential () based on the Keras framework, and the neural network was built in the model in the manner:
model.add(Dense(units,activation))
the model is characterized in that model.add () is a function for creating a neural network layer, dense () is a function for creating a full connection layer, units are node numbers, and activation is an activation function;
setting the activation function of the input layer and the full connection layer as 'relu', wherein the activation function is as follows:
f(x)=max(0,x)
wherein max () is a maximum function, x is a neuron input value;
thus, the neural network comprising the input layer, the fully connected layer and the output layer is constructed in the following manner:
wherein input_shape is the size of the input tensor of the input layer, and None is not set with an activation function.
The specific process of the step (4) is as follows:
after the neural network is built, a model needs to be trained and a loss value is calculated, and the learning process is configured in the following way:
model.compile(loss,optimizer,metrics)
wherein model () is a configuration function, loss is a loss function, optimizer is an optimizer, and metrics represents performance indexes of the evaluation model during training and testing;
setting a loss function as ' mean_squared_error ', setting an optimizer as ' Adam ' optimization algorithm, and setting metrics as mean square error ' metrics.
After parameter configuration is completed, model objects are used for training, and the mode of training a model is as follows:
model.fit(x_train,y_train,validation_data,epochs,verbose,batch_size)
wherein model. Fit () is training function, x_train and y_train are input and output of training set, verification_data is verification set, epochs represents training total number of rounds, and verbose is display option of training process; batch_size represents the number of samples taken in one training;
after training, judging the fitting effect by the output fitting evaluation result, wherein the output mode of the evaluation result is as follows:
model.evaluate(x_test,y_test,verbose)
wherein model. Evaluation () is an evaluation output function, x_test and y_test are test set input and output data, and verbose is a presentation option;
judging whether fitting is carried out or not and whether the fitting effect meets the requirement or not through the output evaluation index; when the fitting result does not meet the requirement, parameter setting of the model is adjusted, and optimization of the neural network model is performed until the fitting result meets the requirement;
after the neural network completes fitting, the structure of the neural network and the weight value of each node on any layer are obtained and output and stored, and the mode of storing the network structure and the weight is as follows:
model.to_json(path)
model.save_weights(path)
where model. To_json () is a model structure save function, model. Save_weights () is a weight save function, and path represents a save path.
The prediction mode in the step (5) is as follows:
model.predict(x future )
wherein model. Prediction () is a prediction function, x future Inputting data for a future area by setting x future The medium active and passive emission label predicts the future active carbon emission or total amount of passive carbon emission in the region.
The beneficial effects of the invention are as follows:
(1) The indexes related to the spatial information are included in the carbon emission prediction index system, and the final prediction result can be more reasonable and interpretable by considering the spatial factors.
(2) In order to accurately and effectively make and implement emission decisions, the regional emission prediction results are divided into active emission and passive emission, the richness and the accuracy of the carbon emission prediction results are improved, and the method is beneficial to making and implementing more accurate emission reduction strategies.
(3) The neural network prediction model based on the Keras framework is provided, the high modularization of the Keras framework is fully utilized, the Keras framework is convenient to build and debug, the code structure is concise and clear, the execution efficiency is high, and the simulation can be realized quickly, so that the prediction result can be obtained.
Drawings
FIG. 1 is a flow chart of a method of an embodiment of the present invention.
FIG. 2 is a graph of the loss values corresponding to the total number of training rounds in the practice of the present invention.
FIG. 3 is a graph of validation of predicted results in accordance with an embodiment of the present invention.
Detailed Description
The invention will be described in further detail with reference to the accompanying drawings.
The flow of the method according to the embodiment of the invention is shown in fig. 1, and comprises the following steps:
and (1) determining a comprehensive index system for covering geographic positions of areas, and influencing regional civil aviation main passive carbon emission in the aspects of social economy and civil aviation transportation. The method specifically comprises the following steps:
and (A) determining a geographic position index. The geographic position index is an obvious characteristic for indicating the region, and comprises the longitude and latitude (degree) of the central coordinate of the region and the area (square kilometer) of the region;
and (B) determining a socioeconomic index. The socioeconomic performance index mainly reflects the development level of the area and is related to population, industry, culture and the like of the area. The socioeconomic index considers selecting different annual population (people), GDP total amount (hundred million yuan) and people average GDP index (yuan) of each region;
and (C) determining civil aviation transportation indexes. The civil aviation transport index indicates the development condition of the civil aviation in the region to a certain extent, and indirectly indicates the emission level of the civil aviation in the region. Civil aviation transportation indexes comprise civil airport quantity (number), take-off and landing times (number of times), passenger throughput (number of people) and goods-mail throughput (ton);
and (D) determining the active and passive carbon emission labels. Carbon emissions generated in an area during the LTO and CCD phases of flights that typically take off and land in the area are referred to as active emissions for the area, while carbon emissions during the CCD phases of flights that fly through the area are referred to as passive emissions. To be able to autonomously select either the predicted active emissions or the passive emissions, an active emissions tag (1) is optionally added with a passive emissions tag (0) to distinguish the data.
And (2) collecting and preprocessing specific numerical values of all indexes in the area to establish a data set, and dividing the data set into a training set and a testing set. The method specifically comprises the following steps:
and (a) collecting specific values of all indexes of the area, wherein the carbon emission result is divided into active emission and passive emission, thereby establishing a data set, and storing the data set as comma delimiter (.csv) files under the file_path path.
The data set is imported into python for processing in the following way:
pd.read_csv(file_path)
wherein: the pd.read_csv () represents comma delimiter file reading method;
in step (b), in order to facilitate rapid convergence of the neural network, the dimension of the data is unified by adopting a standard normalization mode, and the data set is preprocessed:
wherein x is * For the processed sample data, x is the original sample data, μ is the mean value of the sample data, and δ is the standard deviation of the sample data.
After preprocessing is completed, the data set is divided into a training set and a testing set, and the dividing method comprises the following steps:
train_test_spilt(*arrays,test_size,random_state)
the method comprises the steps of (a) dividing a data set by using a train_test_space () as a data set dividing function, wherein the array is sample data, the test_size is the proportion of the number of samples of a test set to the total number of the data set, the test_size epsilon [0,1], the random_state is a random seed, and the random seed is set as a constant, so that the consistency of multiple running results can be ensured.
And (3) constructing a neural network comprising an input layer, a full connection layer and an output layer based on the Keras framework.
The method specifically comprises the following steps:
each node of the full-connection layer is connected with all nodes of the upper layer and is used for integrating the features extracted in the previous step. A Sequential model was built using model=sequential () based on the Keras framework, and the neural network was built in the model in the manner:
model.add(Dense(units,activation))
wherein model. Add () is create neural network layer function, dense () is create full connection layer function, units is node number, activation is activation function.
And the activation function of the input layer and the full connection layer is set as 'relu', which is in the form of:
f(x)=max(0,x)
wherein max () is a maximum function, x is a neuron input value;
the manner in which the neural network is ultimately constructed is as follows:
wherein input_shape is the size of the input tensor of the input layer, and None is not set with an activation function.
After the creation is finished, model. Add (Dropout) is used, in the forward propagation process, the probability that each fully-connected layer keeps each neuron in the training process is changed by setting the Dropout value, so that the activation value of a certain neuron stops working with a certain probability, the model generalization can be stronger, and the model does not depend on certain local characteristics too much, thereby reducing or avoiding the phenomenon of overfitting;
and (4) constructing a loss function and an optimization function by using an API of a Python calling Keras framework, training a neural network model on a training set, optimizing model parameters by using a test set, and finally outputting and storing the structure and weight of the final neural network. The method comprises the following specific steps:
training the built neural network and calculating a loss value, and configuring a learning process in the following manner:
model.compile(loss='mean_squared_error',optimizer='adam',metrics=[metrics.mae])
wherein model () is a configuration function, loss is a loss function, mean_squared_error is a root mean square error, adam is an adaptive moment estimation algorithm, optimizer is an optimizer, metrics represents an evaluation index of an evaluation model during training and testing, and mae is an average absolute error.
The mean square error "mean_squared_error" is chosen to be set as a loss function in the form of:
wherein, MSE is root mean square error,for the sample ith true value, +.>The i-th predicted value is the sample, and n is the sample number of the verification set;
the selection sets the optimizer as an adaptive moment estimation (Adam) optimization algorithm. Adam's algorithm can calculate the adaptive learning rate of each parameter, the parameter update formula is as follows:
wherein m is t And v t The estimates of the first and second instants in the gradient respectively,and->Updated values for the first time and the second time, respectively,/->And->The first moment estimated exponential decay rate at the moment t and the second moment estimated exponential decay rate at the moment t are respectively beta 1 And beta 2 Initial value divisionAre respectively set to 0.9 and 0.999, theta t And theta t+1 Network parameters respectively representing t and t+1 time are epsilon used for improving numerical stability, and the recommended value is 10 -8 η is the learning rate.
The evaluation index metrics selection is set to mean square error "metrics. Mae", the result of which does not participate in the training process.
And (II) training by using a model object after the definition of the loss function is completed, wherein the parameter setting mode of the training model is as follows:
model.fit(x_train,y_train,val_data=(x_val,y_val),epochs,verbose=1,batch_size)
the model is characterized in that model () is a training function, x_train and y_train are comprehensive index values of a training set region and active and passive emission of a corresponding region, val_data is a verification set, wherein x_val and y_val divided by a data set are contained, epochs represent total wheel numbers of training, verbose=1 represents output log information in the training process, and batch_size represents the number of samples sampled in one training.
After training, judging the fitting effect by outputting a network fitting evaluation result, wherein the output mode is as follows:
model.evaluate(x_val,y_val,verbose=0)
wherein model. Evaluation () is an evaluation output function, x_val and y_val are test set input and output data, and verbose=0 indicates that log information is not output at the standard output stream;
judging whether fitting and fitting effect are good or bad through the output evaluation indexes, and adjusting parameter setting in the neural network construction and model training configuration, so that optimization of the neural network model is completed.
And (III) acquiring the structure of the trained neural network and the weight value of each node on any layer, and outputting and storing the weight value. The mode for storing the network structure and the weight is as follows:
model.to_json(path)
model.save_weights(path)
the model_json () is a model structure save function, the model structure can be saved as json (JavaScript Object Notation, JS object tag) file, the model_save_weights () is a weight save function, the weight matrix can be saved as h5 file, and the path represents the save path.
The mode of corresponding loading model structure and weight is as follows:
model=model_from_json(open(path,'r').read())
model.load_weights(path)
wherein, model is model object, open () is model file function under searching path, read () is model file reading function, r' is read-only mode, model_from_json () is loading model structure function, model_load_weights () is loading weight function, path represents saving path.
And (5) according to the index data of the future region, using the trained neural model to predict the active and passive carbon emission of the future region. The prediction mode is as follows:
model.predict(x future )
wherein model. Prediction () is a prediction function, x future Is the input data of the future area after standard normalization processing.
Taking national provinces and civil aviation main passive carbon emission prediction as an example, 31 provinces (municipal/autonomous areas) (not including port and Australian stations) of the country are selected as areas, the time span is set to be 2007-2016 for 10 years, specific values of indexes of each province in 10 years are collected, wherein a carbon emission result is divided into active emission and passive emission, a data set of 620 samples with 12 dimensions is established, and the data set is stored as comma separator files (.csv) under a file path.
The data set file is imported into python for processing, and the reading mode is as follows:
pd.read_csv(file_path)
dividing the preprocessed data set into a training set and a testing set, wherein the dividing method comprises the following steps:
train_test_spilt(*arrays,test_size=0.3,random_state=2020)
where, the array is a data set, test_size is the ratio of the number of samples of the test set to the total number of data sets, and test_size e [0,1], where test_size=0.3 indicates that the data set samples are divided into 30% test set (186 samples) and 70% training set (434 samples), random_state is a random seed, and setting the random seed to a constant (2020) can ensure that the results of multiple runs remain consistent.
The neural network model comprising an input layer, three full-connection layers and an output layer is constructed, the neuron number ratio of each layer is set to be 50, 35, 20, 15 and 1, and the mode of constructing the neural network finally is as follows:
after the creation is finished, model. Add (Dropout) is used, in the forward propagation process, the probability that each fully-connected layer keeps each neuron in the training process is changed by setting the Dropout value, so that the activation value of a certain neuron stops working with a certain probability, and the model generalization can be stronger because the model does not depend on certain local characteristics too much, thereby reducing or avoiding the phenomenon of overfitting. The probabilities of the input layer and the three layers of full-connection layers are respectively set to be 0.5, 0.25 and 0.1, and parameter conditions of each layer of the model are output through a function model (), and the parameter conditions are specifically shown in table 1;
TABLE 1
Layer(type) Output Shape Param#
dense_1 (None,50) 650
dropout_1 (None,50) 0
dense_2 (None,35) 1785
dropout_2 (None,35) 0
dense_3 (None,20) 720
dropout_3 (None,20) 0
dense_4 (None,15) 315
dropout_4 (None,15) 0
dense_5 (None,1) 16
In the table, layer is a neural network Layer name, which contains the name of the corresponding Dropout parameter of the network Layer, output Shape is the Output size of the network Layer, and the Output size is presented in tensor form, and Param# is the total number of parameters contained in the network Layer.
Training is carried out by using model objects, and the specific parameter setting mode of a training model is as follows:
model.fit(x_train,y_train,val_data=(x_val,y_val),
epochs=800,verbose=1,batch_size=64)
the model. Fit () is a training function, x_train and y_train are the comprehensive index value of the training set region and the active and passive emission of the corresponding region, val_data is a verification set, wherein verification sets x_val and y_val divided by the data set are included, epochs=800 indicates that the total number of training rounds is 800 rounds, verbose=1 indicates that log information is output in the training process, and batch_size=64 indicates that the number of samples sampled in one training is 64. After training is completed, a relation image of the loss value and the total number of training wheels and a distribution image of the predicted value and the actual value are output in a visual mode, so that the fitting condition of the neural network can be clearly observed, as shown in fig. 2 and 3; after training, the fitting effect is judged through the output fitting evaluation result, and the smaller the loss value is, the better accuracy of the prediction model description experimental data is shown, and the loss of the test set is 14.9848 after multiple parameter adjustment.
And the active and passive emission prediction of a certain province in the future can be performed through the trained neural network. Taking Guangdong province of 2035 as an example, collecting predicted values corresponding to various input indexes, wherein data corresponding to part of indexes are shown in table 2;
TABLE 2
Store Table 2 data to x future In the array, the specific mode of the prediction function is as follows:
result=pd.DataFrame({'pollution':model.predict(x future ).reshape(1,-1)[0])
wherein: the data frame represents a table creation mode, the poll is a header name, and the reshape is a data remodeling mode;
thereby obtaining a prediction result stored in result, which is specifically: the active emission of Guangdong province in 2035 is 133.86 ×10 5 Ton of passive discharge of 77.01 ×10 5 Tons. The whole fitting process takes 14.58s, and the predicted mean square error is 0.0020.
In summary, the method of the invention designs a prediction method based on the passive carbon emission of the civil aviation main in the Keras region. Comprehensively considering factors related to civil aviation carbon emission in multiple aspects, dividing the civil aviation carbon emission into active emission and passive emission, and determining a comprehensive index system of the civil aviation active and passive carbon emission in the coverage area geographic position, social economy, civil aviation transportation and other influence areas; the neural network is built based on the complete modules of the Keras framework and the concise API, so that the problems of parameter setting and the like can be solved for researchers, the regional active and passive carbon emission prediction results with higher precision can be obtained through data set training fitting, the richness and the accuracy of the carbon emission prediction results are improved, and theoretical support is provided for more accurately developing civil aviation carbon emission reduction work.

Claims (1)

1. The regional civil aviation owner passive carbon emission prediction method based on Keras is characterized by comprising the following steps of:
(1) Determining a comprehensive index system of passive carbon emission of the civil aviation main of the coverage area in the aspects of geographic position, social economy and civil aviation transportation;
(2) Collecting and preprocessing specific values of each index in the region to establish a data set, and dividing the data set into a training set and a testing set;
(3) Constructing a neural network model comprising an input layer, a full-connection layer and an output layer based on a Keras framework, and setting the number of neurons and an activation function of each layer;
(4) Constructing a loss function and an optimization function by using an API of a Keras framework called by Python, training a neural network model on a training set, optimizing model parameters by using a test set, and finally outputting and storing the structure and weight of the neural network;
(5) According to each index data of the future region, performing future region active and passive carbon emission prediction by using a trained neural network model;
the comprehensive index system for influencing regional civil aviation active and passive carbon emission in the step (1) comprises a geographic position, socioeconomic performance, civil aviation transportation and an active and passive emission label, wherein the geographic position index comprises regional center longitude and latitude coordinates and regional area, the socioeconomic performance index comprises population, GDP total amount and GDP per capita, the civil aviation transportation index comprises regional civil airport number, lifting frame times, passenger throughput and goods mail throughput, the active and passive carbon emission label comprises an active emission label and a passive emission label, the active emission label refers to a carbon emission distinguishing label generated in a region in the lifting and cruising stage of flights in the region, and the passive emission label refers to a carbon emission distinguishing label of a CCD stage of flights flying through the region;
the specific process of the step (2) is as follows:
establishing a data set corresponding to the data of each index of the collection area, and preprocessing the data set in a standard normalization mode:
wherein x is * For the processed sample data, x is the original sample data, mu is the average value of the sample data, and delta is the standard deviation of the sample data;
dividing the data set into a training set and a testing set, wherein the dividing method comprises the following steps:
train_test_spilt(*arrays,test_size,random_state)
the method comprises the steps that train_test_space () is a data set dividing function, arrays is a data set, test_size is the proportion of the number of test set samples to the total number of the data set, and test_size E [0,1], and random_state is a random seed;
the specific process of constructing the neural network model comprising the input layer, the full-connection layer and the output layer based on the Keras framework in the step (3) is as follows:
a Sequential model was built using model=sequential () based on the Keras framework, and the neural network was built in the model in the manner:
model.add(Dense(units,activation))
the model is characterized in that model.add () is a function for creating a neural network layer, dense () is a function for creating a full connection layer, units are node numbers, and activation is an activation function;
setting the activation function of the input layer and the full connection layer as 'relu', wherein the activation function is as follows:
f(x)=max(0,x)
wherein max () is a maximum function, x is a neuron input value;
thus, the neural network comprising the input layer, the fully connected layer and the output layer is constructed in the following manner:
wherein input_shape is the size of input tensor of the input layer, none is not set with an activation function;
the specific process of the step (4) is as follows:
after the neural network is built, a model needs to be trained and a loss value is calculated, and the learning process is configured in the following way:
model.compile(loss,optimizer,metrics)
wherein model () is a configuration function, loss is a loss function, optimizer is an optimizer, and metrics represents performance indexes of the evaluation model during training and testing;
setting a loss function as ' mean_squared_error ', setting an optimizer as ' Adam ' optimization algorithm, and setting metrics as mean square error ' metrics.
After parameter configuration is completed, model objects are used for training, and the mode of training a model is as follows:
model.fit(x_train,y_train,validation_data,epochs,verbose,batch_size)
wherein model. Fit () is training function, x_train and y_train are input and output of training set, verification_data is verification set, epochs represents training total number of rounds, and verbose is display option of training process; batch_size represents the number of samples taken in one training;
after training, judging the fitting effect by the output fitting evaluation result, wherein the output mode of the evaluation result is as follows:
model.evaluate(x_test,y_test,verbose)
wherein model. Evaluation () is an evaluation output function, x_test and y_test are test set input and output data, and verbose is a presentation option;
judging whether fitting is carried out or not and whether the fitting effect meets the requirement or not through the output evaluation index; when the fitting result does not meet the requirement, parameter setting of the model is adjusted, and optimization of the neural network model is performed until the fitting result meets the requirement;
after the neural network completes fitting, the structure of the neural network and the weight value of each node on any layer are obtained and output and stored, and the mode of storing the network structure and the weight is as follows:
model.to_json(path)
model.save_weights(path)
model_json () is a model structure save function, model_save_weights () is a weight save function, and path represents a save path;
the prediction mode in the step (5) is as follows:
model.predict(x future )
wherein model. Prediction () is a prediction function, x future Inputting data for a future area by setting x future The medium active and passive emission label predicts the future active carbon emission or total amount of passive carbon emission in the region.
CN202010679105.XA 2020-07-15 2020-07-15 Keras-based regional civil aviation main passive carbon emission prediction method Active CN111882033B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010679105.XA CN111882033B (en) 2020-07-15 2020-07-15 Keras-based regional civil aviation main passive carbon emission prediction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010679105.XA CN111882033B (en) 2020-07-15 2020-07-15 Keras-based regional civil aviation main passive carbon emission prediction method

Publications (2)

Publication Number Publication Date
CN111882033A CN111882033A (en) 2020-11-03
CN111882033B true CN111882033B (en) 2024-04-05

Family

ID=73151769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010679105.XA Active CN111882033B (en) 2020-07-15 2020-07-15 Keras-based regional civil aviation main passive carbon emission prediction method

Country Status (1)

Country Link
CN (1) CN111882033B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112446170A (en) * 2020-11-06 2021-03-05 山东大学 Method for establishing regional ocean bottom temperature thermal infrared remote sensing monitoring and forecasting model
CN112668802B (en) * 2021-01-05 2022-11-22 广东工业大学 Construction carbon emission prediction method based on design parameters
CN113610268A (en) * 2021-06-28 2021-11-05 天津大学 Carbon emission prediction method based on residential area space form
CN113642864B (en) * 2021-07-30 2023-12-05 南京航空航天大学 Analysis method for carbon emission space-time equilibrium of airport passenger aircraft
CN113592194A (en) * 2021-08-23 2021-11-02 北京科技大学 Establishment of CO2Method of throughput effect prediction model and CO2Method for evaluating throughput effect
CN113919574A (en) * 2021-10-14 2022-01-11 天津大学 Keras-based prediction method for heavy metal emission in flue gas of waste incineration plant
CN117575175B (en) * 2024-01-15 2024-03-29 国网浙江省电力有限公司 Carbon emission evaluation method, device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975799A (en) * 2016-06-01 2016-09-28 广东电网有限责任公司电力科学研究院 Method and system for calculating carbon emissions
CN106529732A (en) * 2016-11-18 2017-03-22 国网山东省电力公司电力科学研究院 Carbon emission efficiency prediction method based on neural network and random frontier analysis
CN107909524A (en) * 2016-11-28 2018-04-13 中国铁路总公司 A kind of environmental benefit computational methods of high-speed railway operation phase carbon emission reduction
CN108846526A (en) * 2018-08-08 2018-11-20 华北电力大学 A kind of CO2 emissions prediction technique
CN109190211A (en) * 2018-08-17 2019-01-11 中国科学院地理科学与资源研究所 A method of appraising and deciding area alignment space
CN110378383A (en) * 2019-06-19 2019-10-25 江苏大学 A kind of picture classification method based on Keras frame and deep neural network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975799A (en) * 2016-06-01 2016-09-28 广东电网有限责任公司电力科学研究院 Method and system for calculating carbon emissions
CN106529732A (en) * 2016-11-18 2017-03-22 国网山东省电力公司电力科学研究院 Carbon emission efficiency prediction method based on neural network and random frontier analysis
CN107909524A (en) * 2016-11-28 2018-04-13 中国铁路总公司 A kind of environmental benefit computational methods of high-speed railway operation phase carbon emission reduction
CN108846526A (en) * 2018-08-08 2018-11-20 华北电力大学 A kind of CO2 emissions prediction technique
CN109190211A (en) * 2018-08-17 2019-01-11 中国科学院地理科学与资源研究所 A method of appraising and deciding area alignment space
CN110378383A (en) * 2019-06-19 2019-10-25 江苏大学 A kind of picture classification method based on Keras frame and deep neural network

Also Published As

Publication number Publication date
CN111882033A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN111882033B (en) Keras-based regional civil aviation main passive carbon emission prediction method
US10606862B2 (en) Method and apparatus for data processing in data modeling
CN110674999A (en) Cell load prediction method based on improved clustering and long-short term memory deep learning
CN109523316A (en) The automation modeling method of commerce services model
CN111145042A (en) Power distribution network voltage abnormity diagnosis method adopting full-connection neural network
CN108595267A (en) A kind of resource regulating method and system based on deeply study
CN109920248B (en) Bus arrival time prediction method based on GRU neural network
CN104091216A (en) Traffic information predication method based on fruit fly optimization least-squares support vector machine
CN115564114B (en) Airspace carbon emission short-term prediction method and system based on graph neural network
CN107766929A (en) model analysis method and device
CN112489497B (en) Airspace operation complexity evaluation method based on deep convolutional neural network
CN109767128A (en) imaging satellite autonomous task planning method based on machine learning
CN115034126A (en) Method and system for optimizing LSTM neural network model through wolf algorithm
CN111292124A (en) Water demand prediction method based on optimized combined neural network
CN114781704B (en) Flight delay prediction method based on outbound flight guarantee flow
CN114723142A (en) Multi-target land utilization simulation system and method based on non-dominated sorting genetic algorithm and FLUS model
CN114662793A (en) Business process remaining time prediction method and system based on interpretable hierarchical model
CN113222057A (en) Data prediction model training method, data prediction device, data prediction equipment and data prediction medium
CN113011559A (en) Automatic machine learning method and system based on kubernets
CN112036598A (en) Charging pile use information prediction method based on multi-information coupling
CN111882114A (en) Short-term traffic flow prediction model construction method and prediction method
CN114548350A (en) Power load prediction method based on goblet sea squirt group and BP neural network
CN110619422A (en) Intelligent station passenger flow condition prediction method and system
CN113344391A (en) Method for evaluating artificial intelligence enterprise innovation efficiency based on DEA improved model
CN114091776A (en) K-means-based multi-branch AGCNN short-term power load prediction method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant