CN111882033A - Keras-based regional civil aviation active and passive carbon emission prediction method - Google Patents

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

Info

Publication number
CN111882033A
CN111882033A CN202010679105.XA CN202010679105A CN111882033A CN 111882033 A CN111882033 A CN 111882033A CN 202010679105 A CN202010679105 A CN 202010679105A CN 111882033 A CN111882033 A CN 111882033A
Authority
CN
China
Prior art keywords
model
carbon emission
active
training
passive
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.)
Granted
Application number
CN202010679105.XA
Other languages
Chinese (zh)
Other versions
CN111882033B (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

Images

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 active and 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 which covers geographical positions of areas, socioeconomic areas and influences the main and passive carbon emission of the civil aviation in the areas of civil aviation transportation; 2) establishing a data set by collecting various index values in the region, and dividing the data set into a training set and a test 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) building a loss function and an optimization function by using Python to call API of a Keras framework, 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, performing regional active and passive carbon emission prediction by using the model. The method improves the richness and accuracy of the carbon emission prediction result, and provides theoretical support for developing civil aviation carbon emission reduction work.

Description

Keras-based regional civil aviation active and passive carbon emission prediction method
Technical Field
The invention relates to a Keras-based regional civil aviation active and 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 subject of the emissions. Therefore, reducing aircraft carbon emissions is a core task to achieve green growth in civil aviation. Before the carbon reduction action is carried out, the carbon emission condition of civil aviation needs to be known in detail, so that relevant departments are required to establish a carbon emission list of civil aviation, and the system grasps the current situation and the trend of the carbon emission of civil aviation. Considering the particularity of the cross-region operation of civil aircrafts and the pertinence of effective improvement of emission reduction measures, the carbon emission of civil aircrafts in a certain region is divided into active carbon emission (namely the carbon emission generated in the region in the stages of LTO (Landing and Take-off) and CCD (Climb, Cruise and Descent) of taking off and Landing in the region and passive carbon emission (namely the carbon emission in the stage of the rest of CCDs flying over flights in the region), and more reasonable and targeted emission reduction targets can be provided so as to achieve ideal emission reduction effects. Therefore, the prediction of the active and passive carbon emission of regional civil aviation can provide support for more accurately carrying out the carbon emission reduction work of civil aviation.
Generally, the prediction is most common in methods such as linear regression, neural networks, random forests and the like, and the linear regression method needs to judge whether the input and the output are in a linear relation before use, so that the method has higher limitation; the neural network can well make up for the defect, and although the common BP (Back propagation, error inverse propagation algorithm) neural network can realize prediction, the fitting speed is low, the precision is not high enough, so that the prediction result cannot meet the ideal standard; the random forest approach involves 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 differentiation and the like in civil aviation carbon emission prediction. Keras is a deep learning framework based on Theano (machine learning library) and is also an Application Programming Interface (API), and the design of the Keras refers to Torch (deep learning framework) and uses Python (computer Programming language) to write and further encapsulate TensorFlow (symbolic mathematical system based on data flow Programming).
Disclosure of Invention
The invention provides a Keras-based regional civil aviation active and passive carbon emission prediction method, aiming at solving the defects that active and passive carbon emission is not distinguished in the existing regional civil aviation emission prediction, the prediction precision is low, the calculation speed is slow and the like. And according to the index data of the future region, the active and passive carbon emission prediction of the future region can be carried out by using the model.
The invention adopts the following technical scheme for solving the technical problems:
a Keras-based regional civil aviation active and passive carbon emission prediction method comprises the following steps:
(1) determining a comprehensive index system which covers geographical positions of areas, socioeconomic areas and influences the main and passive carbon emission of the civil aviation in the areas of civil aviation transportation;
(2) collecting and preprocessing specific numerical values of various indexes 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) building a loss function and an optimization function by using an API (application programming interface) of a Pyron 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 neural network;
(5) and (4) according to each index data of the future region, performing active and passive carbon emission prediction of the future region by using the trained neural network model.
The comprehensive index system for influencing the regional civil aviation active and passive carbon emission in the step (1) comprises a geographical position, social economy, civil aviation transportation and active and passive emission labels, the geographical position index comprises a regional center longitude and latitude coordinate and a regional area, the social economy index comprises population, total GDP (gas distribution process) and average GDP (human resource distribution process), the civil aviation transportation index comprises the number of civil airports, the number of taking-off and landing frames, passenger throughput and goods and mail throughput in the region, the active and passive carbon emission labels comprise active emission labels and passive emission labels, the active emission labels are carbon emission distinguishing labels generated in the region during the taking-off and landing and cruising phases of the taking-off and landing flights in the region, and the passive emission labels are carbon emission distinguishing labels in the CCD (charge coupled device) phase of flights flying over the region.
The specific process of the step (2) is as follows:
establishing a data set by collecting data corresponding to each index in the area, and preprocessing the data set by adopting a standard normalization mode:
Figure BDA0002585126080000021
wherein x is*Taking the processed sample data as x, original sample data as mu, and taking the average value of the sample data as the standard deviation of the sample data;
dividing a data set into a training set and a test set, wherein the dividing method comprises the following steps:
train_test_spilt(*arrays,test_size,random_state)
wherein train _ test _ tailor () is a data set partition function, atrays is a data set, test _ size is the proportion of the number of samples in the test set to the total number of the data set, and test _ size ∈ [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:
constructing a Sequential model by using model ═ Sequential () based on a Keras framework, wherein a mode for constructing a neural network in the model comprises the following steps:
model.add(Dense(units,activation))
add () is a function for creating a neural network layer, Dense () is a function for creating a fully-connected layer, units are node numbers, and activation is an activation function;
the activation function for the input layer and the full connection layer is set to be 'relu', which is in the form of:
f(x)=max(0,x)
where max () is the maximum function and x is the neuron input value;
therefore, the way to construct a neural network comprising an input layer, a fully connected layer and an output layer is as follows:
Figure BDA0002585126080000031
wherein, input _ shape is the size of the input tensor of the input layer, and None is the unset activation function.
The specific process of the step (4) is as follows:
after the neural network is constructed, a model needs to be trained and a loss value needs to be calculated, and the learning process is configured in the following mode:
model.compile(loss,optimizer,metrics)
the model & company () is a configuration function, the loss is a loss function, the optimizer is an optimizer, and the 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 (metric. mae);
after parameter configuration is completed, a model object is used for training, and the mode of training the model is as follows:
model.fit(x_train,y_train,validation_data,epochs,verbose,batch_size)
fit () is a training function, x _ train and y _ train are input and output of a training set, validity _ data is a verification set, epochs represents the total number of training rounds, and verbose is a display option of a training process; batch _ size represents the number of samples taken in a training session;
after training is finished, the fitting effect is judged according to the output fitting evaluation result, and the output mode of the evaluation result is as follows:
model.evaluate(x_test,y_test,verbose)
model & evaluation () is an evaluation output function, x _ test and y _ test are test set input and output data, and verbose is a display option;
judging whether fitting is performed or not and whether the fitting effect meets the requirements or not through the output evaluation indexes; when the fitting result does not meet the requirement, adjusting the parameter setting of the model, and optimizing the neural network model until the fitting result meets the requirement;
after the neural network finishes fitting, the structure of the neural network and the weight values of all nodes on any layer are obtained and output and stored, and the mode of storing the network structure and the weight values is as follows:
model.to_json(path)
model.save_weights(path)
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(xfuture)
predict () is the prediction function, xfutureInputting data for a future area by setting xfutureThe medium active and passive emission label predicts the total amount of future active carbon emission or passive carbon emission of the region.
The invention has the following beneficial effects:
(1) indexes related to spatial information are included in the carbon emission prediction index system, and the final prediction result is more reasonable and interpretable by considering 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 accuracy of the carbon emission prediction results are improved, and more accurate emission reduction strategies can be made and implemented.
(3) The neural network prediction model based on the Keras framework is provided, the high modularization of the Keras framework is fully utilized, the construction and debugging are convenient, the code structure is simple and clear, the execution efficiency is high, the fitting can be quickly realized, and the prediction result is obtained.
Drawings
FIG. 1 is a process flow diagram of an embodiment of the present invention.
FIG. 2 is a graph of loss values corresponding to the total number of training rounds in the practice of the present invention.
FIG. 3 is a graph of predicted result validation for the implementation of the present invention.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings.
The flow of the method according to the embodiment of the present invention is shown in fig. 1, and includes the following steps:
and (1) determining a comprehensive index system which covers the geographical position of the region, influences the main and passive carbon emission of the regional civil aviation in the aspects of social economy and civil aviation transportation. The method specifically comprises the following steps:
and (A) determining a geographical position index. The geographical position index is an obvious characteristic indicating the area, and comprises the longitude and latitude (degree) of the central coordinate of the area and the area (square kilometer) of the area;
and (B) determining the social and economic indexes. The socioeconomic index mainly reflects the development level of the area and is related to population, industry, culture and the like of the area. Selecting population (people) of different years, total GDP (gross GDP unit) and GDP index (unit GDP) of average person in each area in consideration of social and economic indexes;
and (C) determining the civil aviation transportation index. The civil aviation transportation index shows the development condition of the civil aviation in the area to a certain extent, and indirectly shows the emission level of the civil aviation in the area at the same time. Civil aviation transportation indexes comprise the number (number) of civil airports, the taking-off and landing frame times (frame times), the passenger throughput (people times) and the goods and mail throughput (ton);
and (D) determining an active and passive carbon emission label. The carbon emissions generated in a region by flight-LTO and CCD stages that typically take off and land in the region are referred to as active emissions for the region, while the carbon emissions from flight-CCD stages that fly over the region are referred to as passive emissions. To enable autonomous selection of predicted active emissions or passive emissions, the addition of an active emissions label (1) and a passive emissions label (0) is selected to distinguish the data.
And (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. The method specifically comprises the following steps:
and (a) collecting specific values of each index of the area, wherein the carbon emission result is divided into active emission and passive emission, so as to establish a data set, and the data set is stored as a comma separator (. csv) file located under a file _ path.
And importing the data set into python for processing, wherein the reading mode is as follows:
pd.read_csv(file_path)
wherein: read _ csv () represents a comma separator file reading method;
step (b), in order to facilitate rapid convergence of the neural network, selecting a standard normalization mode to unify the dimension of data, and preprocessing the data set:
Figure BDA0002585126080000061
wherein x is*The processed sample data is x is the original sample data, μ is the mean value of the sample data, and is the standard deviation of the sample data.
After the preprocessing is finished, 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 of obtaining a random seed, setting the random seed as a constant, wherein train _ test _ tailor () is a data set dividing function, arrays is sample data, test _ size is the proportion of the number of the sample in the test set to the total number of the data set, and the test _ size belongs to [0,1], and random _ state is the random seed, and the random seed is set to be a constant to ensure that the results of multiple operations are consistent.
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 fully connected layer is connected with all nodes of the previous layer for integrating the extracted characteristics in the previous step. Constructing a Sequential model by using model ═ Sequential () based on a Keras framework, wherein a mode for constructing a neural network in the model comprises the following steps:
model.add(Dense(units,activation))
add () is to create a neural network layer function, density () is to create a fully-connected layer function, units are node numbers, and activation is an activation function.
And the activation functions of the input layer and the full connection layer are set to be 'relu', and the form is as follows:
f(x)=max(0,x)
where max () is the maximum function and x is the neuron input value;
the way in which the neural network is finally constructed is as follows:
Figure BDA0002585126080000071
wherein, input _ shape is the size of the input tensor of the input layer, and None is the unset activation function.
Add (Dropout) is used after the creation is completed, in the forward propagation process, the probability that each fully-connected layer retains each neuron in the training process is changed by setting a Dropout value, 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 some local features too much, so that the phenomenon of overfitting is reduced or avoided;
and (4) building a loss function and an optimization function by using an API (application programming interface) of a Pyron calling Keras framework, training the neural network model on a training set, optimizing the model parameters by using a test set, and finally outputting and storing the final structure and weight of the neural network. The method comprises the following specific steps:
step (I), training the built neural network and calculating a loss value, wherein the mode of configuring the learning process is as follows:
model.compile(loss='mean_squared_error',optimizer='adam',metrics=[metrics.mae])
the model & company () is a configuration function, the loss is a loss function, the mean _ squared _ error is a root mean square error, the adam is an adaptive moment estimation algorithm, the optimizer is an optimizer, the metrics represents evaluation indexes of the evaluation model during training and testing, and the mae is an average absolute error.
The mean square error "mean _ squared _ error" is chosen to be set as a loss function, of the form:
Figure BDA0002585126080000072
wherein MSE is the root mean square error,
Figure BDA0002585126080000073
for the ith real value of the sample,
Figure BDA0002585126080000074
the ith prediction value of the sample is obtained, and n is the number of samples of the verification set;
the optimizer is selected to be set to an adaptive moment estimation (Adam) optimization algorithm. The Adam algorithm can calculate the adaptive learning rate of each parameter, and the parameter update formula is as follows:
Figure BDA0002585126080000075
Figure BDA0002585126080000076
Figure BDA0002585126080000081
wherein m istAnd vtRespectively, an estimation of a first time instant and a second time instant in the gradientThe value is evaluated in such a way that,
Figure BDA0002585126080000082
and
Figure BDA0002585126080000083
respectively the update values at the first time instant and the second time instant,
Figure BDA0002585126080000084
and
Figure BDA0002585126080000085
respectively is the first moment estimated exponential decay rate at the time t and the second moment estimated exponential decay rate at the time t, beta1And beta2Are set to 0.9 and 0.999, theta, respectivelytAnd thetat+1Representing the network parameters at time t and t +1, respectively, to improve numerical stability, with a proposed value of 10-8And eta is the learning rate.
Mae, the evaluation index metrics is selected to be set to mean square error, with the result not participating in the training process.
And (II) after the loss function is defined, training by using a model object, 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 _ fit () is a training function, x _ train and y _ train are the comprehensive index values of the training set region and the active and passive discharge of the corresponding region, val _ data is a verification set which comprises x _ val and y _ val divided from the data set, epochs represent the total number of rounds of training, verbose ═ 1 represents the output log information in the training process, and batch _ size represents the size of samples taken in one training.
After training is finished, the fitting effect is judged by outputting a network fitting evaluation result, and the output mode is as follows:
model.evaluate(x_val,y_val,verbose=0)
evaluating () is an evaluation output function, x _ val and y _ val are test set input and output data, and verbose 0 represents that log information is not output in a standard output stream;
whether fitting and the quality of the fitting effect are judged through the output evaluation indexes, and parameter setting in the neural network construction and model training configuration is adjusted, so that the optimization of the neural network model is completed.
And (III) acquiring the structure of the trained neural network and the weight values of all nodes on any layer, outputting and storing. The way of saving the network structure and the weight is as follows:
model.to_json(path)
model.save_weights(path)
model.to _ json () is a model structure save function, a model structure can be saved as a json (JS Object Notation) file, model.save _ weights () is a weight save function, a weight matrix can be saved as an h5 file, and path represents a save path.
The corresponding mode for loading the model structure and the weight is as follows:
model=model_from_json(open(path,'r').read())
model.load_weights(path)
the model is a model object, open () is a model file function under a search path, read () is a model file reading function, 'r' is a read-only mode, model _ from _ json () is a loading model structure function, model _ load _ weights () is a loading weight function, and path represents a saving path.
And (5) according to each index data of the future region, performing active and passive carbon emission prediction of the future region by using the trained neural model. The prediction method is as follows:
model.predict(xfuture)
predict () is the prediction function, xfutureThe input data of the future area after standard normalization processing.
Specifically, taking the prediction of active and passive carbon emission of civil aviation of provinces of the whole country as an example, 31 provinces (cities/municipalities) (not including port and Australia stations) of the whole country are selected as areas, the time span is set to 10 years in 2007-2016, specific values of each index of each province of the 10 years are collected, the carbon emission result is divided into active emission and passive emission, and therefore a data set with dimension of 12 and total 620 samples is established and stored as a comma separator file (. csv) located under a file _ path.
Importing the data set file into python for processing, wherein the reading mode is as follows:
pd.read_csv(file_path)
dividing the preprocessed data set into a training set and a test set, wherein the dividing method comprises the following steps:
train_test_spilt(*arrays,test_size=0.3,random_state=2020)
where, arrays is the data set, test _ size is the proportion of the number of samples in the test set to the total number of the data set, and test _ size is e [0,1], where test _ size is 0.3, which means that the data set samples are divided into 30% test set (186 samples) and 70% training set (434 samples), and random _ state is the random seed, and setting the random seed to be a constant (2020) can ensure that the results of multiple runs are consistent.
Constructing a neural network model comprising an input layer, three full-connection layers and an output layer, setting the number ratio of neurons in each layer to be 50, 35, 20, 15 and 1, and finally constructing a neural network in the following mode:
Figure BDA0002585126080000101
add (Dropout) is used after creation, and in the process of forward propagation, the probability that each fully-connected layer retains each neuron in the training process is changed by setting a Dropout value, and the activation value of a certain neuron stops working with a certain probability, so that the model generalization is stronger, because the model does not depend on some local features too much, and the phenomenon of overfitting is reduced or avoided. Setting the probabilities of the input layer and the three full-connection layers to be 0.5, 0.25 and 0.1 respectively, and outputting the parameter conditions of each layer of the model through a function model.
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 the name of a neural network Layer and includes the name of a Dropout parameter corresponding to the network Layer, Output Shape is the Output size of the network Layer and is presented in a tensor form, and Param # is the total number of the parameters included in the network Layer.
And (3) training by using a model object, wherein the specific parameter setting mode of the 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 composite index value of the training set region and the active and passive discharge of the corresponding region, val _ data is a verification set comprising the verification set x _ val and y _ val divided from the data set, epochs 800 represents that the total number of training rounds is 800 rounds, verbose 1 represents the output log information in the training process, and batch _ size 64 represents that the number of samples taken in one training round is 64. After the training is finished, outputting a loss value and total training round number relation image and a predicted value and actual value distribution image in a visual mode, and clearly observing the fitting condition of the neural network, as shown in fig. 2 and 3; after training is finished, the fitting effect is judged according to the output fitting evaluation result, the smaller the loss value is, the better accuracy of the prediction model description experiment data is shown, and the loss of the test set is 14.9848 after multiple parameter adjustments.
And the active and passive emission prediction of a certain province in the future can be carried out through the trained neural network. Taking Guangdong province of 2035 years as an example, collecting the predicted values corresponding to each input index, wherein the data corresponding to part of the indexes is shown in Table 2;
TABLE 2
Figure BDA0002585126080000121
Store Table 2 data to xfutureIn the array, the specific mode used by the prediction function is as follows:
result=pd.DataFrame({'pollution':model.predict(xfuture).reshape(1,-1)[0])
wherein: the dataframe represents a table creating mode, the solution is a header name, and the reshape is a data reshaping mode;
thereby obtaining the prediction result stored in result, and the result is specifically: active discharge of 133.86X 10 in Guangdong province of 2035 years5Ton, passive discharge 77.01X 105Ton. The whole fitting process takes 14.58s, and the predicted mean square error is 0.0020.
In conclusion, the method provided by the invention designs a prediction method based on Keras regional civil aviation active and passive carbon emission. Comprehensively considering factors related to civil aviation carbon emission in various aspects, dividing the civil aviation carbon emission into active emission and passive emission, and determining a comprehensive index system for influencing regional civil aviation active and passive carbon emission, such as regional geographical position, social economy, civil aviation transportation and the like; the neural network is constructed based on a complete module of a Keras framework and a concise API, so that the problems of parameter setting and the like can be solved for researchers, a regional active and passive carbon emission prediction result with higher precision can be obtained through data set training fitting, the richness and the accuracy of the carbon emission prediction result are improved, and theoretical support is provided for developing civil aviation carbon emission reduction work more accurately.

Claims (6)

1. A Keras-based regional civil aviation active and passive carbon emission prediction method is characterized by comprising the following steps:
(1) determining a comprehensive index system which covers geographical positions of areas, socioeconomic areas and influences the main and passive carbon emission of the civil aviation in the areas of civil aviation transportation;
(2) collecting and preprocessing specific numerical values of various indexes 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) building a loss function and an optimization function by using an API (application programming interface) of a Pyron 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 neural network;
(5) and (4) according to each index data of the future region, performing active and passive carbon emission prediction of the future region by using the trained neural network model.
2. The Keras-based regional civil aviation active and passive carbon emission prediction method according to claim 1, characterized in that the comprehensive index system for the active and passive carbon emission of civil aviation in the affected area in the step (1) comprises a geographical position, social economy, civil aviation transportation and active and passive emission labels, the geographic position indexes comprise longitude and latitude coordinates of a region center and a region area, the socioeconomic indexes comprise population, total GDP (gross GDP) and average GDP, the civil aviation transportation indexes comprise the number of civil airports, the taking-off and landing times, the passenger throughput and the goods and mail throughput in the region, the active and passive emission labels comprise an active emission label and a passive emission label, the active emission label refers to a carbon emission distinguishing label generated in a region during the flight take-off and landing and cruise stages of take-off and landing in the region, the passive emission label refers to a carbon emission distinguishing label of a CCD stage flying over flights in the area.
3. The Keras-based regional civil aviation active and passive carbon emission prediction method as claimed in claim 1, wherein the specific process of step (2) is as follows:
establishing a data set by collecting data corresponding to each index in the area, and preprocessing the data set by adopting a standard normalization mode:
Figure FDA0002585126070000011
wherein x is*Taking the processed sample data as x, original sample data as mu, and taking the average value of the sample data as the standard deviation of the sample data;
dividing a data set into a training set and a test set, wherein the dividing method comprises the following steps:
train_test_spilt(*arrays,test_size,random_state)
wherein train _ test _ tailor () is a data set partition function, atrays is a data set, test _ size is the proportion of the number of samples in the test set to the total number of the data set, and test _ size ∈ [0,1], and random _ state is a random seed.
4. The Keras-based regional civil aviation active and passive carbon emission prediction method according to claim 1, wherein the Keras framework-based construction of the neural network model comprising the input layer, the full connection layer and the output layer in the step (3) is implemented by the following specific process:
constructing a Sequential model by using model ═ Sequential () based on a Keras framework, wherein a mode for constructing a neural network in the model comprises the following steps:
model.add(Dense(units,activation))
add () is a function for creating a neural network layer, Dense () is a function for creating a fully-connected layer, units are node numbers, and activation is an activation function;
the activation function for the input layer and the full connection layer is set to be 'relu', which is in the form of:
f(x)=max(0,x)
where max () is the maximum function and x is the neuron input value;
therefore, the way to construct a neural network comprising an input layer, a fully connected layer and an output layer is as follows:
Figure FDA0002585126070000021
wherein, input _ shape is the size of the input tensor of the input layer, and None is the unset activation function.
5. The Keras-based regional civil aviation active and passive carbon emission prediction method as claimed in claim 1, wherein the specific process of step (4) is as follows:
after the neural network is constructed, a model needs to be trained and a loss value needs to be calculated, and the learning process is configured in the following mode:
model.compile(loss,optimizer,metrics)
the model & company () is a configuration function, the loss is a loss function, the optimizer is an optimizer, and the 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 (metric. mae);
after parameter configuration is completed, a model object is used for training, and the mode of training the model is as follows:
model.fit(x_train,y_train,validation_data,epochs,verbose,batch_size)
fit () is a training function, x _ train and y _ train are input and output of a training set, validity _ data is a verification set, epochs represents the total number of training rounds, and verbose is a display option of a training process; batch _ size represents the number of samples taken in a training session;
after training is finished, the fitting effect is judged according to the output fitting evaluation result, and the output mode of the evaluation result is as follows:
model.evaluate(x_test,y_test,verbose)
model & evaluation () is an evaluation output function, x _ test and y _ test are test set input and output data, and verbose is a display option;
judging whether fitting is performed or not and whether the fitting effect meets the requirements or not through the output evaluation indexes; when the fitting result does not meet the requirement, adjusting the parameter setting of the model, and optimizing the neural network model until the fitting result meets the requirement;
after the neural network finishes fitting, the structure of the neural network and the weight values of all nodes on any layer are obtained and output and stored, and the mode of storing the network structure and the weight values is as follows:
model.to_json(path)
model.save_weights(path)
model.to _ json () is a model structure save function, model.save _ weights () is a weight save function, and path represents a save path.
6. The Keras-based regional civil aviation active and passive carbon emission prediction method as claimed in claim 1, wherein: the prediction mode in the step (5) is as follows:
model.predict(xfuture)
predict () is the prediction function, xfutureInputting data for a future area by setting xfutureThe medium active and passive emission label predicts the total amount of future active carbon emission or passive carbon emission of 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 true CN111882033A (en) 2020-11-03
CN111882033B 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)

Cited By (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
CN112668802A (en) * 2021-01-05 2021-04-16 广东工业大学 Construction carbon emission prediction method based on design parameters
CN113592194A (en) * 2021-08-23 2021-11-02 北京科技大学 Establishment of CO2Method of throughput effect prediction model and CO2Method for evaluating throughput effect
CN113610268A (en) * 2021-06-28 2021-11-05 天津大学 Carbon emission prediction method based on residential area space form
CN113642864A (en) * 2021-07-30 2021-11-12 南京航空航天大学 Analysis method for space-time balance of carbon emission of airport passenger aircraft
CN113919574A (en) * 2021-10-14 2022-01-11 天津大学 Keras-based prediction method for heavy metal emission in flue gas of waste incineration plant
CN117575175A (en) * 2024-01-15 2024-02-20 国网浙江省电力有限公司 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

Cited By (9)

* 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
CN112668802A (en) * 2021-01-05 2021-04-16 广东工业大学 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
CN113642864A (en) * 2021-07-30 2021-11-12 南京航空航天大学 Analysis method for space-time balance of carbon emission of airport passenger aircraft
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
CN117575175A (en) * 2024-01-15 2024-02-20 国网浙江省电力有限公司 Carbon emission evaluation method, device, electronic equipment and storage medium
CN117575175B (en) * 2024-01-15 2024-03-29 国网浙江省电力有限公司 Carbon emission evaluation method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111882033B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN111882033A (en) Keras-based regional civil aviation active and passive carbon emission prediction method
US10606862B2 (en) Method and apparatus for data processing in data modeling
CN111401601B (en) Delay propagation-oriented flight take-off and landing time prediction method
CN107766929A (en) model analysis method and device
CN112054943B (en) Traffic prediction method for mobile network base station
CN116506470B (en) Intelligent gas GIS-based safety inspection method and Internet of things system
CN115564114B (en) Airspace carbon emission short-term prediction method and system based on graph neural network
CN109767128A (en) imaging satellite autonomous task planning method based on machine learning
CN111192090A (en) Seat allocation method and device for flight, storage medium and electronic equipment
CN109754122A (en) A kind of Numerical Predicting Method of the BP neural network based on random forest feature extraction
CN114943356A (en) Airport arrival passenger taxi short-time demand integrated prediction method
CN111292124A (en) Water demand prediction method based on optimized combined neural network
CN114611781A (en) Flight plan-oriented outbound passenger gathering information prediction method and system
Liang et al. An improved adaptive parallel genetic algorithm for the airport gate assignment problem
CN113448808B (en) Method, system and storage medium for predicting single task time in batch processing task
CN114723142A (en) Multi-target land utilization simulation system and method based on non-dominated sorting genetic algorithm and FLUS model
CN114781704A (en) Flight delay prediction method based on station-passing flight guarantee process
CN112200375B (en) Prediction model generation method, prediction model generation device, and computer-readable medium
CN111260161A (en) Method and device for issuing crowdsourcing tasks
CN117669837A (en) Airport land side transfer traffic mode selection prediction method and system
CN117370766A (en) Satellite mission planning scheme evaluation method based on deep learning
CN110909946B (en) Flight plan optimization method based on road transfer
CN115907079B (en) Airspace traffic flow prediction method based on attention space-time diagram convolutional network
CN114390582B (en) Base station site prediction method and device
CN116485589A (en) Business analysis method and system applied to travel enterprise management

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