Files
mlpack/doc/html/simple__tolerance__termination_8hpp_source.html
T

139 lines
50 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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: src/mlpack/methods/amf/termination_policies/simple_tolerance_termination.hpp Source File</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><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#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="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_44a936ef30fc126706c6284a2fc0c990.html">mlpack</a></li><li class="navelem"><a class="el" href="dir_3cfbf900288ec2fe8dd2c2c8482f216e.html">methods</a></li><li class="navelem"><a class="el" href="dir_5d79f627790f2a48f4f1d0c9d0b8c107.html">amf</a></li><li class="navelem"><a class="el" href="dir_c5874ad48fbf1d21a244b283cb97025e.html">termination_policies</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">simple_tolerance_termination.hpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="simple__tolerance__termination_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="preprocessor">#ifndef _MLPACK_METHODS_AMF_SIMPLE_TOLERANCE_TERMINATION_HPP_INCLUDED</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="preprocessor">#define _MLPACK_METHODS_AMF_SIMPLE_TOLERANCE_TERMINATION_HPP_INCLUDED</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="prereqs_8hpp.html">mlpack/prereqs.hpp</a>&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacemlpack.html">mlpack</a> {</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="keyword">namespace </span>amf {</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> MatType&gt;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html"> 31</a></span>&#160;<span class="keyword">class </span><a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html">SimpleToleranceTermination</a></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;{</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a211e1a094f8b09306ca9075dc46d1aa8"> 35</a></span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a211e1a094f8b09306ca9075dc46d1aa8">SimpleToleranceTermination</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7ca90ef65b4072467d258d879e5f87fd">tolerance</a> = 1e-5,</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aeb7869091777f40c596921150c3160ee">maxIterations</a> = 10000,</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#acef07b22f82155a36d6113062673a887">reverseStepTolerance</a> = 3)</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; : <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7ca90ef65b4072467d258d879e5f87fd">tolerance</a>(<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7ca90ef65b4072467d258d879e5f87fd">tolerance</a>),</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aeb7869091777f40c596921150c3160ee">maxIterations</a>(<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aeb7869091777f40c596921150c3160ee">maxIterations</a>),</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#acef07b22f82155a36d6113062673a887">reverseStepTolerance</a>(<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#acef07b22f82155a36d6113062673a887">reverseStepTolerance</a>) {}</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a431ae3d55f891fdec470b67b6088e115"> 47</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a431ae3d55f891fdec470b67b6088e115">Initialize</a>(<span class="keyword">const</span> MatType&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a3ec61564840737b44c072e094dec40cf">V</a>)</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; {</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aded182686517b8d619881ec99119d91c">residueOld</a> = DBL_MAX;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aed2371feda85570210918182acb8aaee">iteration</a> = 1;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a> = DBL_MIN;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae166d65df97c1b6d54ec26e0c9d80c26">reverseStepCount</a> = 0;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a395717707a591a6b1d090906a891783e">isCopy</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; this-&gt;V = &amp;<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a3ec61564840737b44c072e094dec40cf">V</a>;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a6990c70e1e0c63374ceef0ad7b2b9f66">c_index</a> = 0;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0f5be15a55c0c17ccdfc56b31eaedd6c">c_indexOld</a> = 0;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae166d65df97c1b6d54ec26e0c9d80c26">reverseStepCount</a> = 0;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; }</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7eaf891dd69f5585a25d60575436afa6"> 69</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7eaf891dd69f5585a25d60575436afa6">IsConverged</a>(arma::mat&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0a0f84a9934da7457207c3ee8f66c0f3">W</a>, arma::mat&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a169747c545ddb472969e45f862d32a5d">H</a>)</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; {</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; arma::mat WH;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; WH = W * <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a169747c545ddb472969e45f862d32a5d">H</a>;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="comment">// compute residue</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aded182686517b8d619881ec99119d91c">residueOld</a> = <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a>;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keywordtype">size_t</span> n = <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a3ec61564840737b44c072e094dec40cf">V</a>-&gt;n_rows;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordtype">size_t</span> m = <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a3ec61564840737b44c072e094dec40cf">V</a>-&gt;n_cols;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keywordtype">double</span> sum = 0;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keywordtype">size_t</span> count = 0;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i = 0;i &lt; n;i++)</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; {</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> j = 0;j &lt; m;j++)</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordtype">double</span> temp = 0;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordflow">if</span> ((temp = (*<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a3ec61564840737b44c072e094dec40cf">V</a>)(i,j)) != 0)</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; {</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; temp = (temp - WH(i, j));</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; temp = temp * temp;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; sum += temp;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; count++;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; }</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; }</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; }</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a> = sum / count;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a> = sqrt(<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a>);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="comment">// increment iteration count</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aed2371feda85570210918182acb8aaee">iteration</a>++;</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <a class="code" href="classmlpack_1_1Log.html#a403428883bc3b47cf96924abb6a40adf">Log::Info</a> &lt;&lt; <span class="stringliteral">&quot;Iteration &quot;</span> &lt;&lt; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aed2371feda85570210918182acb8aaee">iteration</a> &lt;&lt; <span class="stringliteral">&quot;; residue &quot;</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; &lt;&lt; ((<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aded182686517b8d619881ec99119d91c">residueOld</a> - <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a>) / <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aded182686517b8d619881ec99119d91c">residueOld</a>) &lt;&lt; <span class="stringliteral">&quot;.\n&quot;</span>;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="comment">// if residue tolerance is not satisfied</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keywordflow">if</span> ((<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aded182686517b8d619881ec99119d91c">residueOld</a> - <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a>) / residueOld &lt; tolerance &amp;&amp; iteration &gt; 4)</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; {</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="comment">// check if this is a first of successive drops</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae166d65df97c1b6d54ec26e0c9d80c26">reverseStepCount</a> == 0 &amp;&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a395717707a591a6b1d090906a891783e">isCopy</a> == <span class="keyword">false</span>)</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="comment">// store a copy of W and H matrix</span></div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a395717707a591a6b1d090906a891783e">isCopy</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; this-&gt;W = <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0a0f84a9934da7457207c3ee8f66c0f3">W</a>;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; this-&gt;H = <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a169747c545ddb472969e45f862d32a5d">H</a>;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="comment">// store residue values</span></div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a6990c70e1e0c63374ceef0ad7b2b9f66">c_index</a> = <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a>;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0f5be15a55c0c17ccdfc56b31eaedd6c">c_indexOld</a> = <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aded182686517b8d619881ec99119d91c">residueOld</a>;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; }</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="comment">// increase successive drop count</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae166d65df97c1b6d54ec26e0c9d80c26">reverseStepCount</a>++;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="comment">// if tolerance is satisfied</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; {</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="comment">// initialize successive drop count</span></div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae166d65df97c1b6d54ec26e0c9d80c26">reverseStepCount</a> = 0;</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="comment">// if residue is droped below minimum scrap stored values</span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a> &lt;= <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0f5be15a55c0c17ccdfc56b31eaedd6c">c_indexOld</a> &amp;&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a395717707a591a6b1d090906a891783e">isCopy</a> == <span class="keyword">true</span>)</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a395717707a591a6b1d090906a891783e">isCopy</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; }</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="comment">// check if termination criterion is met</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae166d65df97c1b6d54ec26e0c9d80c26">reverseStepCount</a> == <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#acef07b22f82155a36d6113062673a887">reverseStepTolerance</a> || <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aed2371feda85570210918182acb8aaee">iteration</a> &gt; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aeb7869091777f40c596921150c3160ee">maxIterations</a>)</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; {</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="comment">// if stored values are present replace them with current value as they</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="comment">// represent the minimum residue point</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a395717707a591a6b1d090906a891783e">isCopy</a>)</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; {</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; W = this-&gt;<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0a0f84a9934da7457207c3ee8f66c0f3">W</a>;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; H = this-&gt;<a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a169747c545ddb472969e45f862d32a5d">H</a>;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a> = <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a6990c70e1e0c63374ceef0ad7b2b9f66">c_index</a>;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; }</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; }</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; }</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae6e1c530312d990139024ed97acaf305"> 149</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">double</span>&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae6e1c530312d990139024ed97acaf305">Index</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a>; }</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ac2bbb8b62fd0098d84f258505201400b"> 152</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span>&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ac2bbb8b62fd0098d84f258505201400b">Iteration</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aed2371feda85570210918182acb8aaee">iteration</a>; }</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae43aa9244e7ec923a8d9c8e7ea01613e"> 155</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span>&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae43aa9244e7ec923a8d9c8e7ea01613e">MaxIterations</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aeb7869091777f40c596921150c3160ee">maxIterations</a>; }</div><div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a59626df38f19156f9cbdb445c81edb2f"> 156</a></span>&#160; <span class="keywordtype">size_t</span>&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a59626df38f19156f9cbdb445c81edb2f">MaxIterations</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aeb7869091777f40c596921150c3160ee">maxIterations</a>; }</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a9c38064655871ae641a29e0daa0fcf8c"> 159</a></span>&#160; <span class="keyword">const</span> <span class="keywordtype">double</span>&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a9c38064655871ae641a29e0daa0fcf8c">Tolerance</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7ca90ef65b4072467d258d879e5f87fd">tolerance</a>; }</div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#abad426b83dcb898d03d4d74179f04124"> 160</a></span>&#160; <span class="keywordtype">double</span>&amp; <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#abad426b83dcb898d03d4d74179f04124">Tolerance</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7ca90ef65b4072467d258d879e5f87fd">tolerance</a>; }</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7ca90ef65b4072467d258d879e5f87fd"> 164</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7ca90ef65b4072467d258d879e5f87fd">tolerance</a>;</div><div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aeb7869091777f40c596921150c3160ee"> 166</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aeb7869091777f40c596921150c3160ee">maxIterations</a>;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a3ec61564840737b44c072e094dec40cf"> 169</a></span>&#160; <span class="keyword">const</span> MatType* <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a3ec61564840737b44c072e094dec40cf">V</a>;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aed2371feda85570210918182acb8aaee"> 172</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aed2371feda85570210918182acb8aaee">iteration</a>;</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aded182686517b8d619881ec99119d91c"> 175</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aded182686517b8d619881ec99119d91c">residueOld</a>;</div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6"> 176</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">residue</a>;</div><div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab880981f0bbede4302b0dbd37b60c20a"> 177</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab880981f0bbede4302b0dbd37b60c20a">normOld</a>;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#acef07b22f82155a36d6113062673a887"> 180</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#acef07b22f82155a36d6113062673a887">reverseStepTolerance</a>;</div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae166d65df97c1b6d54ec26e0c9d80c26"> 182</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae166d65df97c1b6d54ec26e0c9d80c26">reverseStepCount</a>;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a395717707a591a6b1d090906a891783e"> 186</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a395717707a591a6b1d090906a891783e">isCopy</a>;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0a0f84a9934da7457207c3ee8f66c0f3"> 189</a></span>&#160; arma::mat <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0a0f84a9934da7457207c3ee8f66c0f3">W</a>;</div><div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a169747c545ddb472969e45f862d32a5d"> 190</a></span>&#160; arma::mat <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a169747c545ddb472969e45f862d32a5d">H</a>;</div><div class="line"><a name="l00191"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0f5be15a55c0c17ccdfc56b31eaedd6c"> 191</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0f5be15a55c0c17ccdfc56b31eaedd6c">c_indexOld</a>;</div><div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a6990c70e1e0c63374ceef0ad7b2b9f66"> 192</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a6990c70e1e0c63374ceef0ad7b2b9f66">c_index</a>;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;}; <span class="comment">// class SimpleToleranceTermination</span></div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;} <span class="comment">// namespace amf</span></div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;} <span class="comment">// namespace mlpack</span></div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;<span class="preprocessor">#endif // _MLPACK_METHODS_AMF_SIMPLE_TOLERANCE_TERMINATION_HPP_INCLUDED</span></div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;</div><div class="ttc" id="namespacemlpack_html"><div class="ttname"><a href="namespacemlpack.html">mlpack</a></div><div class="ttdoc">Linear algebra utility functions, generally performed on matrices or vectors. </div><div class="ttdef"><b>Definition:</b> <a href="binarize_8hpp_source.html#l00018">binarize.hpp:18</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_ae166d65df97c1b6d54ec26e0c9d80c26"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae166d65df97c1b6d54ec26e0c9d80c26">mlpack::amf::SimpleToleranceTermination::reverseStepCount</a></div><div class="ttdeci">size_t reverseStepCount</div><div class="ttdoc">successive residue drops </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00182">simple_tolerance_termination.hpp:182</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_ac2bbb8b62fd0098d84f258505201400b"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ac2bbb8b62fd0098d84f258505201400b">mlpack::amf::SimpleToleranceTermination::Iteration</a></div><div class="ttdeci">const size_t &amp; Iteration() const </div><div class="ttdoc">Get current iteration count. </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00152">simple_tolerance_termination.hpp:152</a></div></div>
<div class="ttc" id="prereqs_8hpp_html"><div class="ttname"><a href="prereqs_8hpp.html">prereqs.hpp</a></div><div class="ttdoc">The core includes that mlpack expects; standard C++ includes and Armadillo. </div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_aed2371feda85570210918182acb8aaee"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aed2371feda85570210918182acb8aaee">mlpack::amf::SimpleToleranceTermination::iteration</a></div><div class="ttdeci">size_t iteration</div><div class="ttdoc">current iteration count </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00172">simple_tolerance_termination.hpp:172</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_abad426b83dcb898d03d4d74179f04124"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#abad426b83dcb898d03d4d74179f04124">mlpack::amf::SimpleToleranceTermination::Tolerance</a></div><div class="ttdeci">double &amp; Tolerance()</div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00160">simple_tolerance_termination.hpp:160</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a7ca90ef65b4072467d258d879e5f87fd"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7ca90ef65b4072467d258d879e5f87fd">mlpack::amf::SimpleToleranceTermination::tolerance</a></div><div class="ttdeci">double tolerance</div><div class="ttdoc">tolerance </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00164">simple_tolerance_termination.hpp:164</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a211e1a094f8b09306ca9075dc46d1aa8"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a211e1a094f8b09306ca9075dc46d1aa8">mlpack::amf::SimpleToleranceTermination::SimpleToleranceTermination</a></div><div class="ttdeci">SimpleToleranceTermination(const double tolerance=1e-5, const size_t maxIterations=10000, const size_t reverseStepTolerance=3)</div><div class="ttdoc">empty constructor </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00035">simple_tolerance_termination.hpp:35</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a3ec61564840737b44c072e094dec40cf"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a3ec61564840737b44c072e094dec40cf">mlpack::amf::SimpleToleranceTermination::V</a></div><div class="ttdeci">const MatType * V</div><div class="ttdoc">pointer to matrix being factorized </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00169">simple_tolerance_termination.hpp:169</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a169747c545ddb472969e45f862d32a5d"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a169747c545ddb472969e45f862d32a5d">mlpack::amf::SimpleToleranceTermination::H</a></div><div class="ttdeci">arma::mat H</div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00190">simple_tolerance_termination.hpp:190</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_ab880981f0bbede4302b0dbd37b60c20a"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab880981f0bbede4302b0dbd37b60c20a">mlpack::amf::SimpleToleranceTermination::normOld</a></div><div class="ttdeci">double normOld</div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00177">simple_tolerance_termination.hpp:177</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_ab0ed0913d895dc954951edaa5f5128b6"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ab0ed0913d895dc954951edaa5f5128b6">mlpack::amf::SimpleToleranceTermination::residue</a></div><div class="ttdeci">double residue</div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00176">simple_tolerance_termination.hpp:176</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a395717707a591a6b1d090906a891783e"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a395717707a591a6b1d090906a891783e">mlpack::amf::SimpleToleranceTermination::isCopy</a></div><div class="ttdeci">bool isCopy</div><div class="ttdoc">indicates whether a copy of information is available which corresponds to minimum residue point ...</div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00186">simple_tolerance_termination.hpp:186</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a0a0f84a9934da7457207c3ee8f66c0f3"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0a0f84a9934da7457207c3ee8f66c0f3">mlpack::amf::SimpleToleranceTermination::W</a></div><div class="ttdeci">arma::mat W</div><div class="ttdoc">variables to store information of minimum residue poi </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00189">simple_tolerance_termination.hpp:189</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_acef07b22f82155a36d6113062673a887"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#acef07b22f82155a36d6113062673a887">mlpack::amf::SimpleToleranceTermination::reverseStepTolerance</a></div><div class="ttdeci">size_t reverseStepTolerance</div><div class="ttdoc">tolerance on successive residue drops </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00180">simple_tolerance_termination.hpp:180</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_ae6e1c530312d990139024ed97acaf305"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae6e1c530312d990139024ed97acaf305">mlpack::amf::SimpleToleranceTermination::Index</a></div><div class="ttdeci">const double &amp; Index() const </div><div class="ttdoc">Get current value of residue. </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00149">simple_tolerance_termination.hpp:149</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_aeb7869091777f40c596921150c3160ee"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aeb7869091777f40c596921150c3160ee">mlpack::amf::SimpleToleranceTermination::maxIterations</a></div><div class="ttdeci">size_t maxIterations</div><div class="ttdoc">iteration threshold </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00166">simple_tolerance_termination.hpp:166</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a6990c70e1e0c63374ceef0ad7b2b9f66"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a6990c70e1e0c63374ceef0ad7b2b9f66">mlpack::amf::SimpleToleranceTermination::c_index</a></div><div class="ttdeci">double c_index</div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00192">simple_tolerance_termination.hpp:192</a></div></div>
<div class="ttc" id="classmlpack_1_1Log_html_a403428883bc3b47cf96924abb6a40adf"><div class="ttname"><a href="classmlpack_1_1Log.html#a403428883bc3b47cf96924abb6a40adf">mlpack::Log::Info</a></div><div class="ttdeci">static MLPACK_EXPORT util::PrefixedOutStream Info</div><div class="ttdoc">Prints informational messages if verbose is specified, prefixed with [INFO ]. </div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l00084">log.hpp:84</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html">mlpack::amf::SimpleToleranceTermination</a></div><div class="ttdoc">This class implements residue tolerance termination policy. </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00031">simple_tolerance_termination.hpp:31</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a431ae3d55f891fdec470b67b6088e115"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a431ae3d55f891fdec470b67b6088e115">mlpack::amf::SimpleToleranceTermination::Initialize</a></div><div class="ttdeci">void Initialize(const MatType &amp;V)</div><div class="ttdoc">Initializes the termination policy before stating the factorization. </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00047">simple_tolerance_termination.hpp:47</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a0f5be15a55c0c17ccdfc56b31eaedd6c"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a0f5be15a55c0c17ccdfc56b31eaedd6c">mlpack::amf::SimpleToleranceTermination::c_indexOld</a></div><div class="ttdeci">double c_indexOld</div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00191">simple_tolerance_termination.hpp:191</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a7eaf891dd69f5585a25d60575436afa6"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a7eaf891dd69f5585a25d60575436afa6">mlpack::amf::SimpleToleranceTermination::IsConverged</a></div><div class="ttdeci">bool IsConverged(arma::mat &amp;W, arma::mat &amp;H)</div><div class="ttdoc">Check if termination criterio is met. </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00069">simple_tolerance_termination.hpp:69</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_aded182686517b8d619881ec99119d91c"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#aded182686517b8d619881ec99119d91c">mlpack::amf::SimpleToleranceTermination::residueOld</a></div><div class="ttdeci">double residueOld</div><div class="ttdoc">residue values </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00175">simple_tolerance_termination.hpp:175</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a9c38064655871ae641a29e0daa0fcf8c"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a9c38064655871ae641a29e0daa0fcf8c">mlpack::amf::SimpleToleranceTermination::Tolerance</a></div><div class="ttdeci">const double &amp; Tolerance() const </div><div class="ttdoc">Access tolerance value. </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00159">simple_tolerance_termination.hpp:159</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_ae43aa9244e7ec923a8d9c8e7ea01613e"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#ae43aa9244e7ec923a8d9c8e7ea01613e">mlpack::amf::SimpleToleranceTermination::MaxIterations</a></div><div class="ttdeci">const size_t &amp; MaxIterations() const </div><div class="ttdoc">Access upper limit of iteration count. </div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00155">simple_tolerance_termination.hpp:155</a></div></div>
<div class="ttc" id="classmlpack_1_1amf_1_1SimpleToleranceTermination_html_a59626df38f19156f9cbdb445c81edb2f"><div class="ttname"><a href="classmlpack_1_1amf_1_1SimpleToleranceTermination.html#a59626df38f19156f9cbdb445c81edb2f">mlpack::amf::SimpleToleranceTermination::MaxIterations</a></div><div class="ttdeci">size_t &amp; MaxIterations()</div><div class="ttdef"><b>Definition:</b> <a href="simple__tolerance__termination_8hpp_source.html#l00156">simple_tolerance_termination.hpp:156</a></div></div>
</div><!-- fragment --></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>