Research Article

Applying Machine Learning to Chemical Industry: A Self-Adaptive GA-BP Neural Network-Based Predictor of Gasoline Octane Number

Algorithm 1

BP neural network training algorithms.
 BPBtrain(){
  Initialize network’'s weights and thresholds;
 While termination conditions are not met {
  For each training sample X in the samples {
 // Forward propagation of inputs
 For Each cell j of the hidden or output layer {
    ;
     // The net input to the computational cell is relative to the previous layer i
    ;
     // Calculate the output of cell j. Choose the sigmod function as the activation function
    }// Reverse propagation error
  For each cell j of the output layer{
    ;// Calculate error
 }
  From the last to the first hidden layer, for each cell j of the hidden layer{
      ;
      // k is a neuron in the next layer of j
      }
  For each weight wij in the network {
    ;
     // weighted value added, where is the learning rate
    ;
     // weight update
    }
  For each deviation in the network {
    // Value added deviation
    ;// Deviation update
    }
   }
  }
 }