mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-30 16:51:57 +08:00
Documentation for db149bf3b7
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: machine_learning/adaline_learning.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,10 +41,10 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
@@ -84,9 +84,16 @@ $(document).ready(function(){initNavTree('d5/db0/adaline__learning_8cpp.html','.
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
@@ -113,7 +120,7 @@ $(document).ready(function(){initNavTree('d5/db0/adaline__learning_8cpp.html','.
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for adaline_learning.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d7/da7/adaline__learning_8cpp__incl.svg" width="100%" height="395"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d7/da7/adaline__learning_8cpp__incl.svg" width="100%" height="393"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
@@ -148,7 +155,7 @@ Variables</h2></td></tr>
|
||||
<div class="textblock"><p ><a href="https://en.wikipedia.org/wiki/ADALINE" target="_blank">Adaptive Linear Neuron (ADALINE)</a> implementation </p>
|
||||
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/kvedala" target="_blank">Krishna Vedala</a></dd></dl>
|
||||
<p><a href="https://commons.wikimedia.org/wiki/File:Adaline_flow_chart.gif"><img src="https://upload.wikimedia.org/wikipedia/commons/b/be/Adaline_flow_chart.gif" alt="Structure of an ADALINE network. Source: Wikipedia" style="width:200px; float:right;" class="inline"/></a></p>
|
||||
<p >ADALINE is one of the first and simplest single layer artificial neural network. The algorithm essentially implements a linear function </p><p class="formulaDsp">
|
||||
<p >ADALINE is one of the first and simplest single layer artificial neural network. The algorithm essentially implements a linear function </p><p class="formulaDsp">
|
||||
\[ f\left(x_0,x_1,x_2,\ldots\right) =
|
||||
\sum_j x_jw_j+\theta
|
||||
\]
|
||||
@@ -156,7 +163,7 @@ Variables</h2></td></tr>
|
||||
<p> where \(x_j\) are the input features of a sample, \(w_j\) are the coefficients of the linear function and \(\theta\) is a constant. If we know the \(w_j\), then for any given set of features, \(y\) can be computed. Computing the \(w_j\) is a supervised learning algorithm wherein a set of features and their corresponding outputs are given and weights are computed using stochastic gradient descent method. </p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a3c04138a5bfe5d72780bb7e82a18e627" name="a3c04138a5bfe5d72780bb7e82a18e627"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">◆ </a></span>main()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -189,26 +196,26 @@ Variables</h2></td></tr>
|
||||
<div class="line"><span class="lineno"> 362</span> eta = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/strtof.html">strtof</a>(argv[1], <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><span class="lineno"> 363</span> }</div>
|
||||
<div class="line"><span class="lineno"> 364</span> </div>
|
||||
<div class="line"><span class="lineno"> 365</span> <a class="code hl_function" href="../../d5/db0/adaline__learning_8cpp.html#a52053d88ea1bcbbed9aca67ab4eeb499">test1</a>(eta);</div>
|
||||
<div class="line"><span class="lineno"> 365</span> <a class="code hl_function" href="../../d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">test1</a>(eta);</div>
|
||||
<div class="line"><span class="lineno"> 366</span> </div>
|
||||
<div class="line"><span class="lineno"> 367</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Press ENTER to continue..."</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 368</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a>.get();</div>
|
||||
<div class="line"><span class="lineno"> 369</span> </div>
|
||||
<div class="line"><span class="lineno"> 370</span> <a class="code hl_function" href="../../d5/db0/adaline__learning_8cpp.html#a379f7488a305f2571f2932b319931f82">test2</a>(eta);</div>
|
||||
<div class="line"><span class="lineno"> 370</span> <a class="code hl_function" href="../../d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">test2</a>(eta);</div>
|
||||
<div class="line"><span class="lineno"> 371</span> </div>
|
||||
<div class="line"><span class="lineno"> 372</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Press ENTER to continue..."</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 373</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a>.get();</div>
|
||||
<div class="line"><span class="lineno"> 374</span> </div>
|
||||
<div class="line"><span class="lineno"> 375</span> <a class="code hl_function" href="../../d5/db0/adaline__learning_8cpp.html#a992bdf1fdb0b9d414bcf7981d2d87aa9">test3</a>(eta);</div>
|
||||
<div class="line"><span class="lineno"> 375</span> <a class="code hl_function" href="../../dd/d0c/hamiltons__cycle_8cpp.html#a0cc94918b6831f308d4fe4fa27f08299">test3</a>(eta);</div>
|
||||
<div class="line"><span class="lineno"> 376</span> </div>
|
||||
<div class="line"><span class="lineno"> 377</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 378</span>}</div>
|
||||
<div class="ttc" id="aadaline__learning_8cpp_html_a379f7488a305f2571f2932b319931f82"><div class="ttname"><a href="../../d5/db0/adaline__learning_8cpp.html#a379f7488a305f2571f2932b319931f82">test2</a></div><div class="ttdeci">void test2(double eta=0.01)</div><div class="ttdef"><b>Definition:</b> adaline_learning.cpp:262</div></div>
|
||||
<div class="ttc" id="aadaline__learning_8cpp_html_a52053d88ea1bcbbed9aca67ab4eeb499"><div class="ttname"><a href="../../d5/db0/adaline__learning_8cpp.html#a52053d88ea1bcbbed9aca67ab4eeb499">test1</a></div><div class="ttdeci">void test1(double eta=0.01)</div><div class="ttdef"><b>Definition:</b> adaline_learning.cpp:224</div></div>
|
||||
<div class="ttc" id="aadaline__learning_8cpp_html_a992bdf1fdb0b9d414bcf7981d2d87aa9"><div class="ttname"><a href="../../d5/db0/adaline__learning_8cpp.html#a992bdf1fdb0b9d414bcf7981d2d87aa9">test3</a></div><div class="ttdeci">void test3(double eta=0.01)</div><div class="ttdef"><b>Definition:</b> adaline_learning.cpp:313</div></div>
|
||||
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="adsu__path__compression_8cpp_html_a45d94ead4cf4e1ff9f87c38bc99f59ae"><div class="ttname"><a href="../../d3/dae/dsu__path__compression_8cpp.html#a45d94ead4cf4e1ff9f87c38bc99f59ae">test2</a></div><div class="ttdeci">static void test2()</div><div class="ttdoc">Self-implementations, 2nd test.</div><div class="ttdef"><b>Definition:</b> dsu_path_compression.cpp:186</div></div>
|
||||
<div class="ttc" id="adsu__path__compression_8cpp_html_ae7880ce913f3058a35ff106d5be9e243"><div class="ttname"><a href="../../d3/dae/dsu__path__compression_8cpp.html#ae7880ce913f3058a35ff106d5be9e243">test1</a></div><div class="ttdeci">static void test1()</div><div class="ttdoc">Self-test implementations, 1st test.</div><div class="ttdef"><b>Definition:</b> dsu_path_compression.cpp:169</div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="ahamiltons__cycle_8cpp_html_a0cc94918b6831f308d4fe4fa27f08299"><div class="ttname"><a href="../../dd/d0c/hamiltons__cycle_8cpp.html#a0cc94918b6831f308d4fe4fa27f08299">test3</a></div><div class="ttdeci">static void test3()</div><div class="ttdef"><b>Definition:</b> hamiltons_cycle.cpp:122</div></div>
|
||||
<div class="ttc" id="asrand_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a></div><div class="ttdeci">T srand(T... args)</div></div>
|
||||
<div class="ttc" id="astrtof_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/strtof.html">std::strtof</a></div><div class="ttdeci">T strtof(T... args)</div></div>
|
||||
<div class="ttc" id="atime_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a></div><div class="ttdeci">T time(T... args)</div></div>
|
||||
@@ -222,7 +229,7 @@ Here is the call graph for this function:</div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="a52053d88ea1bcbbed9aca67ab4eeb499" name="a52053d88ea1bcbbed9aca67ab4eeb499"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a52053d88ea1bcbbed9aca67ab4eeb499">◆ </a></span>test1()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a52053d88ea1bcbbed9aca67ab4eeb499">◆ </a></span>test1()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -275,18 +282,18 @@ Here is the call graph for this function:</div>
|
||||
<div class="ttc" id="aarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/array.html">std::array</a></div></div>
|
||||
<div class="ttc" id="aclassmachine__learning_1_1adaline_html"><div class="ttname"><a href="../../d6/d30/classmachine__learning_1_1adaline.html">machine_learning::adaline</a></div><div class="ttdef"><b>Definition:</b> adaline_learning.cpp:46</div></div>
|
||||
<div class="ttc" id="adata__structures_2sparse__table_8cpp_html_a10f3ffb3f6f7e1b83d556b9c8de89a5d"><div class="ttname"><a href="../../d6/d42/data__structures_2sparse__table_8cpp.html#a10f3ffb3f6f7e1b83d556b9c8de89a5d">data_structures::sparse_table::N</a></div><div class="ttdeci">constexpr uint32_t N</div><div class="ttdoc">A struct to represent sparse table for min() as their invariant function, for the given array A....</div><div class="ttdef"><b>Definition:</b> sparse_table.cpp:47</div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector< double ></a></div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/db0/adaline__learning_8cpp_a52053d88ea1bcbbed9aca67ab4eeb499_cgraph.svg" width="100%" height="594"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/db0/adaline__learning_8cpp_a52053d88ea1bcbbed9aca67ab4eeb499_cgraph.svg" width="100%" height="588"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a379f7488a305f2571f2932b319931f82" name="a379f7488a305f2571f2932b319931f82"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a379f7488a305f2571f2932b319931f82">◆ </a></span>test2()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a379f7488a305f2571f2932b319931f82">◆ </a></span>test2()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -349,14 +356,14 @@ Here is the call graph for this function:</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/db0/adaline__learning_8cpp_a379f7488a305f2571f2932b319931f82_cgraph.svg" width="100%" height="594"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/db0/adaline__learning_8cpp_a379f7488a305f2571f2932b319931f82_cgraph.svg" width="100%" height="588"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a992bdf1fdb0b9d414bcf7981d2d87aa9" name="a992bdf1fdb0b9d414bcf7981d2d87aa9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a992bdf1fdb0b9d414bcf7981d2d87aa9">◆ </a></span>test3()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a992bdf1fdb0b9d414bcf7981d2d87aa9">◆ </a></span>test3()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -422,7 +429,7 @@ Here is the call graph for this function:</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/db0/adaline__learning_8cpp_a992bdf1fdb0b9d414bcf7981d2d87aa9_cgraph.svg" width="100%" height="594"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d5/db0/adaline__learning_8cpp_a992bdf1fdb0b9d414bcf7981d2d87aa9_cgraph.svg" width="100%" height="588"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -434,7 +441,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_3343723ae086de42ee4ca9774da3a13f.html">machine_learning</a></li><li class="navelem"><a class="el" href="../../d5/db0/adaline__learning_8cpp.html">adaline_learning.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user