📄 gridsearch.html
字号:
<html><head> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"> <title>Contents.m</title><link rel="stylesheet" type="text/css" href="../stpr.css"></head><body><table border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline"><td valign="baseline" class="function"><b class="function">GRIDSEARCH</b><td valign="baseline" align="right" class="function"><a href="../misc/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table> <p><b>Function minimization using grid search.
</b></p> <hr><div class='code'><code><span class=help>
</span><br><span class=help> <span class=help_field>Synopsis:</span></span><br><span class=help> [min_x,min_y,X,Y]=gridsearch(Min,Max,Grid,nloops,fun)
</span><br><span class=help> [min_x,min_y,X,Y]=gridsearch(Min,Max,Grid,nloops,fun,varargin)
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Descritpion:</span></span><br><span class=help> This function implements the grid search to find the minimum
</span><br><span class=help> of a given function y = fun(x), x \in X.
</span><br><span class=help> The domain X is discretized to the grid with minimal and
</span><br><span class=help> maximal point given by Min and Max respectively. Number of points
</span><br><span class=help> of the grid is given by Grid. The Max, Min and Grid are vectors
</span><br><span class=help> their entries correspond to individual dimensions of X.
</span><br><span class=help> After the mininum is found then the grid search is recursively
</span><br><span class=help> repeated with a finer grid. Number of nested loops is given by nloops.
</span><br><span class=help> The string fun determines function to be minimized. The function is
</span><br><span class=help> called as y=feval(fun,x,varargin{:}).
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Input:</span></span><br><span class=help> Min [dim x 1] Minimum point of the grid.
</span><br><span class=help> Max [dim x 1] Maximum point of the grid.
</span><br><span class=help> Grid [dim x 1] Number of point in the grid, i.e. grid density.
</span><br><span class=help> nloops [1x1] Number of nested loops of the grid search.
</span><br><span class=help> fun [string] Identifies the minimized function.
</span><br><span class=help> varargin [cell] Additional arguments of the minimized function.
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Output:</span></span><br><span class=help> min_x [dim x 1] Found minimum.
</span><br><span class=help> min_y [1x1] min_y = fun(min_x).
</span><br><span class=help> X [dim x n] Points which the grid search checked through.
</span><br><span class=help> Y [1 x n] Y(i)=fun(X(:,i)).
</span><br><span class=help>
</span><br><span class=help> <span class=help_field>Example:</span></span><br><span class=help> [min_x,min_y,X,Y]=gridsearch(0,10,10,3,'sin');
</span><br><span class=help> figure; grid on; hold on;
</span><br><span class=help> plot(X,Y,'.');
</span><br><span class=help> plot(min_x,min_y,'+r');
</span><br><span class=help>
</span><br></code></div> <hr> <b>Source:</b> <a href= "../misc/list/gridsearch.html">gridsearch.m</a> <p><b class="info_field">About: </b> Statistical Pattern Recognition Toolbox
<br> (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac
<br> <a href="http://www.cvut.cz">Czech Technical University Prague</a>
<br> <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a>
<br> <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a>
<br> <p><b class="info_field">Modifications: </b>
<br> 18-July-2003, VF
<br> 17-July-2003, VF
<br></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -