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...
- Наука та технологія
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.
Yes, here is an example with the TCLab apmonitor.com/do/index.php/Main/TCLabG
@@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.
@@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
@@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
@@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.
Why don't you use sum() for the layer 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
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?
@@jesusmanuellevinsonrondon5107 , yes, each layer is either a vector output. It only collapses to a single value on output.
APMonitor.com thank you
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 ?