Skip to main content
. 2018 Jun 11;18(6):1905. doi: 10.3390/s18061905
Algorithm 2 The learning algorithm of the CNN.
  • 1:

    Input: Features of physiological signals  

  • 2:

    Output: CNN Templets and Aglobal

  • 3:

    Generate CNNs Templates  

  • 4:

    SetAglobal to 0  

  • 5:

    forn=50,100,150,1000,1500do

  • 6:

        for β=0.1,0.01,0.001,0.0001,0.00001 do

  • 7:

            for i=1,,10 do

  • 8:

               Using the ith learning dataset  

  • 9:

               Run SimulinkModelB

  • 10:

               Read Y from SimulinkModelB

  • 11:

               Using Y and g

  • 12:

               Estimate Aglobal using Equation (10)  

  • 13:

               Using the ith learning dataset with the estimated Aglobal

  • 14:

               Run SimulinkModel B  

  • 15:

               Read the emotion states from SimulinkModelB

  • 16:

               Calculate the Accuracy  

  • 17:

               Set the Accuracy to Accuracy repository(i)  

  • 18:

            end forSet the Global Parameter(n,β) = the average of the Accuracy repository  

  • 19:

        end for

  • 20:

    end for

  • 21:

    Select the best CNN configuration from the Global Parameter