Files
mlpack/doc/html/classmlpack_1_1optimization_1_1VanillaUpdate.html
T

242 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>mlpack: mlpack::optimization::VanillaUpdate Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra-stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">mlpack
&#160;<span id="projectnumber">master</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacemlpack.html">mlpack</a></li><li class="navelem"><a class="el" href="namespacemlpack_1_1optimization.html">optimization</a></li><li class="navelem"><a class="el" href="classmlpack_1_1optimization_1_1VanillaUpdate.html">VanillaUpdate</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classmlpack_1_1optimization_1_1VanillaUpdate-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mlpack::optimization::VanillaUpdate Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Vanilla update policy for Stochastic Gradient Descent (<a class="el" href="classmlpack_1_1optimization_1_1SGD.html" title="Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...">SGD</a>).
<a href="classmlpack_1_1optimization_1_1VanillaUpdate.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aee41eddf5f7ff96908c05a4c5dc81ea8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1optimization_1_1VanillaUpdate.html#aee41eddf5f7ff96908c05a4c5dc81ea8">Initialize</a> (const size_t, const size_t)</td></tr>
<tr class="memdesc:aee41eddf5f7ff96908c05a4c5dc81ea8"><td class="mdescLeft">&#160;</td><td class="mdescRight">The Initialize method is called by <a class="el" href="classmlpack_1_1optimization_1_1SGD.html" title="Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...">SGD</a> Optimizer method before the start of the iteration update process. <a href="#aee41eddf5f7ff96908c05a4c5dc81ea8">More...</a><br /></td></tr>
<tr class="separator:aee41eddf5f7ff96908c05a4c5dc81ea8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f3e3e6344fe02cd021c2d2e88b6179b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1optimization_1_1VanillaUpdate.html#a0f3e3e6344fe02cd021c2d2e88b6179b">Update</a> (arma::mat &amp;iterate, const double stepSize, const arma::mat &amp;gradient)</td></tr>
<tr class="memdesc:a0f3e3e6344fe02cd021c2d2e88b6179b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update step for <a class="el" href="classmlpack_1_1optimization_1_1SGD.html" title="Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...">SGD</a>. <a href="#a0f3e3e6344fe02cd021c2d2e88b6179b">More...</a><br /></td></tr>
<tr class="separator:a0f3e3e6344fe02cd021c2d2e88b6179b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Vanilla update policy for Stochastic Gradient Descent (<a class="el" href="classmlpack_1_1optimization_1_1SGD.html" title="Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...">SGD</a>). </p>
<p>The following update scheme is used to update <a class="el" href="classmlpack_1_1optimization_1_1SGD.html" title="Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...">SGD</a> in every iteration:</p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ A_{j + 1} = A_j + \alpha \nabla f_i(A) \]" src="form_56.png"/>
</p>
<p>where <img class="formulaInl" alt="$ \alpha $" src="form_35.png"/> is a parameter which specifies the step size. <img class="formulaInl" alt="$ i $" src="form_57.png"/> is chosen according to <img class="formulaInl" alt="$ j $" src="form_37.png"/> (the iteration number). </p>
<p>Definition at line <a class="el" href="vanilla__update_8hpp_source.html#l00031">31</a> of file <a class="el" href="vanilla__update_8hpp_source.html">vanilla_update.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aee41eddf5f7ff96908c05a4c5dc81ea8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void mlpack::optimization::VanillaUpdate::Initialize </td>
<td>(</td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The Initialize method is called by <a class="el" href="classmlpack_1_1optimization_1_1SGD.html" title="Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...">SGD</a> Optimizer method before the start of the iteration update process. </p>
<p>The vanilla update doesn't initialize anything.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">n_rows</td><td>number of rows in the gradient matrix. </td></tr>
<tr><td class="paramname">n_cols</td><td>number of columns in the gradient matrix. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="vanilla__update_8hpp_source.html#l00042">42</a> of file <a class="el" href="vanilla__update_8hpp_source.html">vanilla_update.hpp</a>.</p>
</div>
</div>
<a class="anchor" id="a0f3e3e6344fe02cd021c2d2e88b6179b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void mlpack::optimization::VanillaUpdate::Update </td>
<td>(</td>
<td class="paramtype">arma::mat &amp;&#160;</td>
<td class="paramname"><em>iterate</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double&#160;</td>
<td class="paramname"><em>stepSize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const arma::mat &amp;&#160;</td>
<td class="paramname"><em>gradient</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Update step for <a class="el" href="classmlpack_1_1optimization_1_1SGD.html" title="Stochastic Gradient Descent is a technique for minimizing a function which can be expressed as a sum ...">SGD</a>. </p>
<p>The function parameters are updated in the negative direction of the gradient.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">iterate</td><td>Parameters that minimize the function. </td></tr>
<tr><td class="paramname">stepSize</td><td>Step size to be used for the given iteration. </td></tr>
<tr><td class="paramname">gradient</td><td>The gradient matrix. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="vanilla__update_8hpp_source.html#l00053">53</a> of file <a class="el" href="vanilla__update_8hpp_source.html">vanilla_update.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/mlpack/core/optimizers/sgd/update_policies/<a class="el" href="vanilla__update_8hpp_source.html">vanilla_update.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
<script type="text/javascript">
var x = document.getElementsByClassName("formulaDsp");
var i;
for (i = 0; i < x.length; i++)
{
x[i].width /= 4;
}
</script>
</html>