Files
mlpack/doc/html/classmlpack_1_1ann_1_1LogisticFunction.html
T

405 lines
18 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::ann::LogisticFunction 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_1ann.html">ann</a></li><li class="navelem"><a class="el" href="classmlpack_1_1ann_1_1LogisticFunction.html">LogisticFunction</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classmlpack_1_1ann_1_1LogisticFunction-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mlpack::ann::LogisticFunction Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>The logistic function, defined by.
<a href="classmlpack_1_1ann_1_1LogisticFunction.html#details">More...</a></p>
<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:a068a36a9f089525012e4d60c8ca35557"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1ann_1_1LogisticFunction.html#a068a36a9f089525012e4d60c8ca35557">Deriv</a> (const double y)</td></tr>
<tr class="memdesc:a068a36a9f089525012e4d60c8ca35557"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the first derivative of the logistic function. <a href="#a068a36a9f089525012e4d60c8ca35557">More...</a><br /></td></tr>
<tr class="separator:a068a36a9f089525012e4d60c8ca35557"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75b4c43eb03549807d17027d0d3dd7f6"><td class="memTemplParams" colspan="2">template&lt;typename InputVecType , typename OutputVecType &gt; </td></tr>
<tr class="memitem:a75b4c43eb03549807d17027d0d3dd7f6"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmlpack_1_1ann_1_1LogisticFunction.html#a75b4c43eb03549807d17027d0d3dd7f6">Deriv</a> (const InputVecType &amp;y, OutputVecType &amp;x)</td></tr>
<tr class="memdesc:a75b4c43eb03549807d17027d0d3dd7f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the first derivatives of the logistic function. <a href="#a75b4c43eb03549807d17027d0d3dd7f6">More...</a><br /></td></tr>
<tr class="separator:a75b4c43eb03549807d17027d0d3dd7f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af75b6672b3baf430bc58e712d0b1a82f"><td class="memTemplParams" colspan="2">template&lt;typename eT &gt; </td></tr>
<tr class="memitem:af75b6672b3baf430bc58e712d0b1a82f"><td class="memTemplItemLeft" align="right" valign="top">static double&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmlpack_1_1ann_1_1LogisticFunction.html#af75b6672b3baf430bc58e712d0b1a82f">Fn</a> (const eT x)</td></tr>
<tr class="memdesc:af75b6672b3baf430bc58e712d0b1a82f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the logistic function. <a href="#af75b6672b3baf430bc58e712d0b1a82f">More...</a><br /></td></tr>
<tr class="separator:af75b6672b3baf430bc58e712d0b1a82f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2200886c6c3e4ccf646d09654b17723c"><td class="memTemplParams" colspan="2">template&lt;typename InputVecType , typename OutputVecType &gt; </td></tr>
<tr class="memitem:a2200886c6c3e4ccf646d09654b17723c"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmlpack_1_1ann_1_1LogisticFunction.html#a2200886c6c3e4ccf646d09654b17723c">Fn</a> (const InputVecType &amp;x, OutputVecType &amp;y)</td></tr>
<tr class="memdesc:a2200886c6c3e4ccf646d09654b17723c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the logistic function. <a href="#a2200886c6c3e4ccf646d09654b17723c">More...</a><br /></td></tr>
<tr class="separator:a2200886c6c3e4ccf646d09654b17723c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9ad2166977be46593e31bdd8aa9b5e9"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmlpack_1_1ann_1_1LogisticFunction.html#ac9ad2166977be46593e31bdd8aa9b5e9">Inv</a> (const double y)</td></tr>
<tr class="memdesc:ac9ad2166977be46593e31bdd8aa9b5e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the inverse of the logistic function. <a href="#ac9ad2166977be46593e31bdd8aa9b5e9">More...</a><br /></td></tr>
<tr class="separator:ac9ad2166977be46593e31bdd8aa9b5e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90c45e5ee5838cf6b4157a6f68f30c80"><td class="memTemplParams" colspan="2">template&lt;typename InputVecType , typename OutputVecType &gt; </td></tr>
<tr class="memitem:a90c45e5ee5838cf6b4157a6f68f30c80"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmlpack_1_1ann_1_1LogisticFunction.html#a90c45e5ee5838cf6b4157a6f68f30c80">Inv</a> (const InputVecType &amp;y, OutputVecType &amp;x)</td></tr>
<tr class="memdesc:a90c45e5ee5838cf6b4157a6f68f30c80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the inverse of the logistic function. <a href="#a90c45e5ee5838cf6b4157a6f68f30c80">More...</a><br /></td></tr>
<tr class="separator:a90c45e5ee5838cf6b4157a6f68f30c80"><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>The logistic function, defined by. </p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\begin{eqnarray*} f(x) &amp;=&amp; \frac{1}{1 + e^{-x}} \\ f'(x) &amp;=&amp; f(x) * (1 - f(x)) \\ f^{-1}(y) &amp;=&amp; ln(\frac{y}{1-y}) \end{eqnarray*}" src="form_68.png"/>
</p>
<p>Definition at line <a class="el" href="logistic__function_8hpp_source.html#l00029">29</a> of file <a class="el" href="logistic__function_8hpp_source.html">logistic_function.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a068a36a9f089525012e4d60c8ca35557"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double mlpack::ann::LogisticFunction::Deriv </td>
<td>(</td>
<td class="paramtype">const double&#160;</td>
<td class="paramname"><em>y</em></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>Computes the first derivative of the logistic function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">x</td><td>Input data. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>f'(x) </dd></dl>
<p>Definition at line <a class="el" href="logistic__function_8hpp_source.html#l00070">70</a> of file <a class="el" href="logistic__function_8hpp_source.html">logistic_function.hpp</a>.</p>
</div>
</div>
<a class="anchor" id="a75b4c43eb03549807d17027d0d3dd7f6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputVecType , typename OutputVecType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void mlpack::ann::LogisticFunction::Deriv </td>
<td>(</td>
<td class="paramtype">const InputVecType &amp;&#160;</td>
<td class="paramname"><em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">OutputVecType &amp;&#160;</td>
<td class="paramname"><em>x</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>Computes the first derivatives of the logistic function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">y</td><td>Input activations. </td></tr>
<tr><td class="paramname">x</td><td>The resulting derivatives. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="logistic__function_8hpp_source.html#l00082">82</a> of file <a class="el" href="logistic__function_8hpp_source.html">logistic_function.hpp</a>.</p>
</div>
</div>
<a class="anchor" id="af75b6672b3baf430bc58e712d0b1a82f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename eT &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double mlpack::ann::LogisticFunction::Fn </td>
<td>(</td>
<td class="paramtype">const eT&#160;</td>
<td class="paramname"><em>x</em></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>Computes the logistic function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">x</td><td>Input data. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>f(x). </dd></dl>
<p>Definition at line <a class="el" href="logistic__function_8hpp_source.html#l00039">39</a> of file <a class="el" href="logistic__function_8hpp_source.html">logistic_function.hpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2200886c6c3e4ccf646d09654b17723c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputVecType , typename OutputVecType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void mlpack::ann::LogisticFunction::Fn </td>
<td>(</td>
<td class="paramtype">const InputVecType &amp;&#160;</td>
<td class="paramname"><em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">OutputVecType &amp;&#160;</td>
<td class="paramname"><em>y</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>Computes the logistic function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">x</td><td>Input data. </td></tr>
<tr><td class="paramname">y</td><td>The resulting output activation. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="logistic__function_8hpp_source.html#l00059">59</a> of file <a class="el" href="logistic__function_8hpp_source.html">logistic_function.hpp</a>.</p>
</div>
</div>
<a class="anchor" id="ac9ad2166977be46593e31bdd8aa9b5e9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static double mlpack::ann::LogisticFunction::Inv </td>
<td>(</td>
<td class="paramtype">const double&#160;</td>
<td class="paramname"><em>y</em></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>Computes the inverse of the logistic function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">y</td><td>Input data. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>f^{-1}(y) </dd></dl>
<p>Definition at line <a class="el" href="logistic__function_8hpp_source.html#l00093">93</a> of file <a class="el" href="logistic__function_8hpp_source.html">logistic_function.hpp</a>.</p>
</div>
</div>
<a class="anchor" id="a90c45e5ee5838cf6b4157a6f68f30c80"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputVecType , typename OutputVecType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void mlpack::ann::LogisticFunction::Inv </td>
<td>(</td>
<td class="paramtype">const InputVecType &amp;&#160;</td>
<td class="paramname"><em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">OutputVecType &amp;&#160;</td>
<td class="paramname"><em>x</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>Computes the inverse of the logistic function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">y</td><td>Input data. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>x The resulting inverse of the input data. </dd></dl>
<p>Definition at line <a class="el" href="logistic__function_8hpp_source.html#l00105">105</a> of file <a class="el" href="logistic__function_8hpp_source.html">logistic_function.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/mlpack/methods/ann/activation_functions/<a class="el" href="logistic__function_8hpp_source.html">logistic_function.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>