run2.sce
来自「Program in matlab for trainig rbf networ」· SCE 代码 · 共 27 行
SCE
27 行
// Initialization and run of differential evolution optimizer// a more complex version with more explicit parameters is in run.m//getf('DiffEvol.sci') // Differential Evolution function [adapt PATH]getf('rosen.sci') // Function to minimize [adapt PATH]// Here for Rosenbrock's function// Change relevant entries to adapt to your personal applications//// VTR "Value To Reach" (stop when function value < VTR) VTR = 1.e-6; // D number of parameters of the objective function D = 2; // XVmin,XVmax column vector of lower and upper bounds of an initial population// the algorithm seems to work well only if [XVmin,XVmax] // covers the region where the global minimum is expected// *** note: these are no bound constraints!! *** XVmin = [-2;-2]; XVmax = [2;2];[x,f,nf] = DiffEvol(rosen,VTR,D,XVmin,XVmax)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?