Files
mlpack/doc/html/classmlpack_1_1amf_1_1RandomAcolInitialization.html
T

280 lines
14 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::amf::RandomAcolInitialization&lt; columnsToAverage &gt; Class Template 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_1amf.html">amf</a></li><li class="navelem"><a class="el" href="classmlpack_1_1amf_1_1RandomAcolInitialization.html">RandomAcolInitialization</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classmlpack_1_1amf_1_1RandomAcolInitialization-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mlpack::amf::RandomAcolInitialization&lt; columnsToAverage &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>This class initializes the W matrix of the <a class="el" href="classmlpack_1_1amf_1_1AMF.html" title="This class implements AMF (alternating matrix factorization) on the given matrix V. ">AMF</a> algorithm by averaging p randomly chosen columns of V.
<a href="classmlpack_1_1amf_1_1RandomAcolInitialization.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:a5a66d72ff9270603b9296168527329c9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1amf_1_1RandomAcolInitialization.html#a5a66d72ff9270603b9296168527329c9">RandomAcolInitialization</a> ()</td></tr>
<tr class="separator:a5a66d72ff9270603b9296168527329c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70e4b426849db310e9cdb228259a63ef"><td class="memTemplParams" colspan="2">template&lt;typename Archive &gt; </td></tr>
<tr class="memitem:a70e4b426849db310e9cdb228259a63ef"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmlpack_1_1amf_1_1RandomAcolInitialization.html#a70e4b426849db310e9cdb228259a63ef">Serialize</a> (Archive &amp;, const unsigned int)</td></tr>
<tr class="memdesc:a70e4b426849db310e9cdb228259a63ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize the object (in this case, there is nothing to serialize). <a href="#a70e4b426849db310e9cdb228259a63ef">More...</a><br /></td></tr>
<tr class="separator:a70e4b426849db310e9cdb228259a63ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:af54f1e4efe3501ded05786889d1e3809"><td class="memTemplParams" colspan="2">template&lt;typename MatType &gt; </td></tr>
<tr class="memitem:af54f1e4efe3501ded05786889d1e3809"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmlpack_1_1amf_1_1RandomAcolInitialization.html#af54f1e4efe3501ded05786889d1e3809">Initialize</a> (const MatType &amp;V, const size_t r, arma::mat &amp;W, arma::mat &amp;H)</td></tr>
<tr class="separator:af54f1e4efe3501ded05786889d1e3809"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;size_t columnsToAverage = 5&gt;<br />
class mlpack::amf::RandomAcolInitialization&lt; columnsToAverage &gt;</h3>
<p>This class initializes the W matrix of the <a class="el" href="classmlpack_1_1amf_1_1AMF.html" title="This class implements AMF (alternating matrix factorization) on the given matrix V. ">AMF</a> algorithm by averaging p randomly chosen columns of V. </p>
<p>In this case, p is a template parameter. H is then filled using a uniform distribution in the range [0, 1].</p>
<p>This simple initialization is the "random Acol initialization" found in the following paper:</p>
<div class="fragment"><div class="line">@techreport{langville2014algorithms,</div><div class="line"> title = {Algorithms, Initializations, and Convergence <span class="keywordflow">for</span> the Nonnegative</div><div class="line"> Matrix Factorization},</div><div class="line"> author = {Langville, A.N. and Meyer, C.D. and Albright, R. and Cox, J. and</div><div class="line"> Duling, D.},</div><div class="line"> year = {2014},</div><div class="line"> institution = {NCSU Technical Report Math 81706}</div><div class="line">}</div></div><!-- fragment --><dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">columnsToAverage</td><td>The number of random columns to average for each column of W. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="random__acol__init_8hpp_source.html#l00044">44</a> of file <a class="el" href="random__acol__init_8hpp_source.html">random_acol_init.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5a66d72ff9270603b9296168527329c9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;size_t columnsToAverage = 5&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classmlpack_1_1amf_1_1RandomAcolInitialization.html">mlpack::amf::RandomAcolInitialization</a>&lt; columnsToAverage &gt;::<a class="el" href="classmlpack_1_1amf_1_1RandomAcolInitialization.html">RandomAcolInitialization</a> </td>
<td>(</td>
<td class="paramname"></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>Definition at line <a class="el" href="random__acol__init_8hpp_source.html#l00048">48</a> of file <a class="el" href="random__acol__init_8hpp_source.html">random_acol_init.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="af54f1e4efe3501ded05786889d1e3809"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;size_t columnsToAverage = 5&gt; </div>
<div class="memtemplate">
template&lt;typename MatType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void <a class="el" href="classmlpack_1_1amf_1_1RandomAcolInitialization.html">mlpack::amf::RandomAcolInitialization</a>&lt; columnsToAverage &gt;::Initialize </td>
<td>(</td>
<td class="paramtype">const MatType &amp;&#160;</td>
<td class="paramname"><em>V</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const size_t&#160;</td>
<td class="paramname"><em>r</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">arma::mat &amp;&#160;</td>
<td class="paramname"><em>W</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">arma::mat &amp;&#160;</td>
<td class="paramname"><em>H</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 class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="random__acol__init_8hpp_source.html#l00052">52</a> of file <a class="el" href="random__acol__init_8hpp_source.html">random_acol_init.hpp</a>.</p>
<p>References <a class="el" href="random_8hpp_source.html#l00071">mlpack::math::RandInt()</a>, and <a class="el" href="log_8hpp_source.html#l00087">mlpack::Log::Warn</a>.</p>
</div>
</div>
<a class="anchor" id="a70e4b426849db310e9cdb228259a63ef"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;size_t columnsToAverage = 5&gt; </div>
<div class="memtemplate">
template&lt;typename Archive &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classmlpack_1_1amf_1_1RandomAcolInitialization.html">mlpack::amf::RandomAcolInitialization</a>&lt; columnsToAverage &gt;::Serialize </td>
<td>(</td>
<td class="paramtype">Archive &amp;&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const unsigned&#160;</td>
<td class="paramname"><em>int</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>Serialize the object (in this case, there is nothing to serialize). </p>
<p>Definition at line <a class="el" href="random__acol__init_8hpp_source.html#l00088">88</a> of file <a class="el" href="random__acol__init_8hpp_source.html">random_acol_init.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/mlpack/methods/amf/init_rules/<a class="el" href="random__acol__init_8hpp_source.html">random_acol_init.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>