Machine Learning with Neural Network in Python GEKKO

Поділитися
Вставка
  • Опубліковано 21 лип 2024
  • Training and testing a simple neural network (3 layers) is shown in Python GEKKO. Using a cosine or hyperbolic tangent activation function influences how many internal nodes are needed. Using a hybrid modeling approach by enforcing structure (or constraints) allows the model to extrapolate better outside the training data set. See apmonitor.com/wiki/index.php/M...
  • Наука та технологія

КОМЕНТАРІ • 13

  • @bL4ckGeniu5
    @bL4ckGeniu5 3 роки тому +1

    Is it possible to couple a Gekko Machine Learning Model with a Gekko MPC (to use the neural network as a process model ) ?
    This idea confirmed would highly boost my motivation to use Gekko for my scientific works. Many thanks in advance.

    • @apm
      @apm  3 роки тому +2

      Yes, here is an example with the TCLab apmonitor.com/do/index.php/Main/TCLabG

    • @bL4ckGeniu5
      @bL4ckGeniu5 3 роки тому +1

      ​@@apm Many thanks for the fast reply! This example is very helpful for my works.
      It would be amazing if APmonitor could share a possible LSTM/RNN realization with Gekko if this was already accomplished. As this is what are we are finally trying to implement.

    • @apm
      @apm  3 роки тому +1

      @@bL4ckGeniu5 I don't have that specific example but here is an LSTM model and a comparison with a 2nd order model: apmonitor.com/do/index.php/Main/LSTMNetwork

    • @bL4ckGeniu5
      @bL4ckGeniu5 3 роки тому +1

      @@apm ​@@apm could you also couple models learned by gekko.brain with the MPC ? As the "coupling script" seems to be from a time before gekko.brian was developed and brain does simplify the process of obtaining a learned model

    • @apm
      @apm  3 роки тому +1

      @@bL4ckGeniu5 yes, it should work to couple them. I don't have any example code to show that. If you do try it, please post any code or questions to Stack overflow so that we can learn from your experience.

  • @jesusmanuellevinsonrondon5107
    @jesusmanuellevinsonrondon5107 4 роки тому +1

    Why don't you use sum() for the layer 1?

    • @apm
      @apm  4 роки тому +1

      The output of the layer is a vector, not a scalar because we are feeding into the next layer with multiple nodes. Check out this new Gekko package for deep learning: gekko.readthedocs.io/en/latest/brain.html

    • @jesusmanuellevinsonrondon5107
      @jesusmanuellevinsonrondon5107 4 роки тому +1

      APMonitor.com in that sense, the layer 3 will receive also a row vector 1x3? And each element of that 1x3 vector is because of that sum() in layer 2, am I correct?

    • @apm
      @apm  4 роки тому +1

      @@jesusmanuellevinsonrondon5107 , yes, each layer is either a vector output. It only collapses to a single value on output.

    • @jesusmanuellevinsonrondon5107
      @jesusmanuellevinsonrondon5107 4 роки тому

      APMonitor.com thank you

    • @nullbyte7140
      @nullbyte7140 4 роки тому +1

      Oh, today is was found your video here, and i‘must say i like it. my questions is there some complet howto to install all components to try some backtests on gekko ?