Optimize ESN Hyperparameters with Grid Search MATLAB
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have the following echo state state network (ESN) hyperparameters: m_GS,k_GS,c_GS,gamma_GS. I would like to use my ESN to find the optimal values for these four hyperparameters using the grid search method in MATLAB. The function I would like to minimize is the discrete time vector L2_loss(m), where M=101 is the number of simulation timesteps in the function for m=1,2,...,M. Hence, L2_loss is a 1 by 101 double vector in my case. My attempt is shown below:
% Grid Search
ndatapoints = 20;
m_GS = linspace(0,1,ndatapoints); % [kg]
k_GS = linspace(0,100,ndatapoints); % [N/m]
c_GS = linspace(0,100,ndatapoints); % [kg/s]
gamma_GS = linspace(100,200,ndatapoints); % [N/m^3]
[m_G,k_G,c_G,gamma_G] = ndgrid(m_GS,k_GS,c_GS,gamma_GS);
fitresult = L2_loss;
[minval, minidx] = min(fitresult);
m_GS_optimal = m_G(minidx);
k_GS_opitimal = k_G(minidx);
c_GS_optimal = c_G(minidx);
gamma_GS_optimal = gamma_G(minidx);
I'm not sure that this is correct as c_GS_optimal and k_GS_optimal are both zero. Do I need to increase ndatapoints or set it equal to m?
3 comentarios
Jonathan Frutschy
el 25 de Abr. de 2024
Editada: Jonathan Frutschy
el 25 de Abr. de 2024
Respuestas (0)
Ver también
Categorías
Más información sobre Pattern Recognition and Classification en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!