CBD.lib.endpoints.html 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>CBD.lib.endpoints module &mdash; CBD Simulation Development Kit documentation</title>
  8. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  9. <!-- <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> -->
  10. <link rel="stylesheet" href="_static/style.css" type="text/css" />
  11. <link rel="index" title="Index" href="genindex.html" />
  12. <link rel="search" title="Search" href="search.html" />
  13. <link rel="next" title="CBD.CBD module" href="CBD.CBD.html" />
  14. <link rel="prev" title="CBD.lib.io module" href="CBD.lib.io.html" />
  15. <script async src="https://www.googletagmanager.com/gtag/js?id=UA-167094275-1"></script>
  16. <script src="_static/js/googleanalytics.min.js"></script>
  17. <script src="_static/js/modernizr.min.js"></script>
  18. <!-- Preload the theme fonts -->
  19. <link rel="preload" href="_static/fonts/FreightSans/freight-sans-book.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  20. <link rel="preload" href="_static/fonts/FreightSans/freight-sans-medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  21. <link rel="preload" href="_static/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  22. <link rel="preload" href="_static/fonts/FreightSans/freight-sans-bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  23. <link rel="preload" href="_static/fonts/FreightSans/freight-sans-medium-italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  24. <link rel="preload" href="_static/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  25. <!-- Preload the katex fonts -->
  26. <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Math-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  27. <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  28. <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Main-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  29. <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size1-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  30. <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size4-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  31. <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size2-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  32. <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Size3-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  33. <link rel="preload" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/fonts/KaTeX_Caligraphic-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
  34. </head>
  35. <div class="container-fluid header-holder tutorials-header" id="header-holder">
  36. <div class="container">
  37. <div class="header-container">
  38. <a class="header-logo" href="https://catalyst-team.com/" aria-label="Catalyst"></a>
  39. <div class="main-menu">
  40. <ul>
  41. <li>
  42. <div class="ecosystem-dropdown">
  43. <a id="dropdownMenuButtonEcosystem" data-toggle="ecosystem-dropdown">
  44. Ecosystem
  45. </a>
  46. <div class="ecosystem-dropdown-menu">
  47. <a class="nav-dropdown-item" href="https://alchemy.host">
  48. <span class=dropdown-title>Alchemy</span>
  49. <p>Experiments logging & visualization</p>
  50. </a>
  51. <a class="nav-dropdown-item" href="https://github.com/catalyst-team/catalyst">
  52. <span class=dropdown-title>Catalyst</span>
  53. <p>Accelerated deep learning R&D</p>
  54. </a>
  55. <a class="nav-dropdown-item" href="https://github.com/catalyst-team/reaction">
  56. <span class=dropdown-title>Reaction</span>
  57. <p>Convenient deep learning models serving</p>
  58. </a>
  59. </div>
  60. </div>
  61. </li>
  62. <li>
  63. <div class="projects-dropdown">
  64. <a id="dropdownMenuButtonProjects" data-toggle="projects-dropdown">
  65. Projects
  66. </a>
  67. <div class="projects-dropdown-menu">
  68. <a class="nav-dropdown-item" href="https://github.com/catalyst-team/codestyle">
  69. <span class=dropdown-title>Codestyle</span>
  70. <p>Joint R&D codestyle</p>
  71. </a>
  72. <a class="nav-dropdown-item" href="https://github.com/catalyst-team/neuro">
  73. <span class=dropdown-title>Catalyst.Neuro</span>
  74. <p>Catalyst.Team and TReNDS collaborative project</p>
  75. </a>
  76. <a class="nav-dropdown-item" href="https://github.com/catalyst-team/classification">
  77. <span class=dropdown-title>Classification</span>
  78. <p>Image classification pipeline with transfer learning</p>
  79. </a>
  80. <a class="nav-dropdown-item" href="https://github.com/catalyst-team/detection">
  81. <span class=dropdown-title>Detection</span>
  82. <p>Object detection pipeline</p>
  83. </a>
  84. <a class="nav-dropdown-item" href="https://github.com/catalyst-team/segmentation">
  85. <span class=dropdown-title>Segmentation</span>
  86. <p>Image semantic segmentation pipeline</p>
  87. </a>
  88. <a class="nav-dropdown-item" href="https://github.com/catalyst-team/gan">
  89. <span class=dropdown-title>Catalyst.GAN</span>
  90. <p>GAN pipelines</p>
  91. </a>
  92. </div>
  93. </div>
  94. </li>
  95. <li>
  96. <a href="https://github.com/catalyst-team/dl-course">Deep learning course</a>
  97. </li>
  98. </ul>
  99. </div>
  100. <a class="main-menu-open-button" href="#" data-behavior="open-mobile-menu"></a>
  101. </div>
  102. </div>
  103. </div>
  104. <body class="catalyst-body">
  105. <div class="table-of-contents-link-wrapper">
  106. <span>Table of Contents</span>
  107. <a href="#" class="toggle-table-of-contents" data-behavior="toggle-table-of-contents"></a>
  108. </div>
  109. <nav data-toggle="wy-nav-shift" class="catalyst-left-menu" id="catalyst-left-menu">
  110. <div class="catalyst-side-scroll">
  111. <div class="catalyst-menu catalyst-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  112. <div class="catalyst-left-menu-search">
  113. <div role="search">
  114. <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
  115. <input type="text" name="q" placeholder="Search Docs" />
  116. <input type="hidden" name="check_keywords" value="yes" />
  117. <input type="hidden" name="area" value="default" />
  118. </form>
  119. </div>
  120. </div>
  121. <p class="caption"><span class="caption-text">Setup</span></p>
  122. <ul>
  123. <li class="toctree-l1"><a class="reference internal" href="install.html">How to install the CBD framework?</a></li>
  124. <li class="toctree-l1"><a class="reference internal" href="running.html">How to run a CBD simulation?</a></li>
  125. <li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
  126. </ul>
  127. <p class="caption"><span class="caption-text">Simple Examples</span></p>
  128. <ul>
  129. <li class="toctree-l1"><a class="reference internal" href="examples/SinGen.html">Sine Generator</a></li>
  130. <li class="toctree-l1"><a class="reference internal" href="examples/EvenNumberGen.html">Hierarchical Even Number Generator</a></li>
  131. <li class="toctree-l1"><a class="reference internal" href="examples/Fibonacci.html">Fibonacci Sequence Generator</a></li>
  132. <li class="toctree-l1"><a class="reference internal" href="examples/LCG.html">Linear Congruential Generator</a></li>
  133. </ul>
  134. <p class="caption"><span class="caption-text">Advanced Examples</span></p>
  135. <ul>
  136. <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
  137. <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
  138. </ul>
  139. <p class="caption"><span class="caption-text">Internal Documentation</span></p>
  140. <ul class="current">
  141. <li class="toctree-l1 current"><a class="reference internal" href="CBD.html">CBD package</a></li>
  142. </ul>
  143. </div>
  144. </div>
  145. </nav>
  146. <div class="catalyst-container">
  147. <div class="catalyst-page-level-bar" id="catalyst-page-level-bar">
  148. <div class="catalyst-breadcrumbs-wrapper">
  149. <div role="navigation" aria-label="breadcrumbs navigation">
  150. <ul class="catalyst-breadcrumbs">
  151. <li>
  152. <a href="index.html">
  153. Docs
  154. </a> &gt;
  155. </li>
  156. <li><a href="CBD.html">CBD package</a> &gt;</li>
  157. <li><a href="CBD.lib.html">Standard CBD Library (BBL)</a> &gt;</li>
  158. <li>CBD.lib.endpoints module</li>
  159. <li class="catalyst-breadcrumbs-aside">
  160. </li>
  161. </ul>
  162. </div>
  163. </div>
  164. <div class="catalyst-shortcuts-wrapper" id="catalyst-shortcuts-wrapper">
  165. Shortcuts
  166. </div>
  167. </div>
  168. <section data-toggle="wy-nav-shift" id="catalyst-content-wrap" class="catalyst-content-wrap">
  169. <div class="catalyst-content-left">
  170. <div class="rst-content">
  171. <div role="main" class="main-content" itemscope="itemscope" itemtype="http://schema.org/Article">
  172. <article itemprop="articleBody" id="catalyst-article" class="catalyst-article">
  173. <div class="section" id="module-CBD.lib.endpoints">
  174. <span id="cbd-lib-endpoints-module"></span><h1>CBD.lib.endpoints module<a class="headerlink" href="#module-CBD.lib.endpoints" title="Permalink to this headline">¶</a></h1>
  175. <dl class="class">
  176. <dt id="CBD.lib.endpoints.CollectorBlock">
  177. <em class="property">class </em><code class="descclassname">CBD.lib.endpoints.</code><code class="descname">CollectorBlock</code><span class="sig-paren">(</span><em>name</em>, <em>input_ports</em>, <em>data=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#CollectorBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.CollectorBlock" title="Permalink to this definition">¶</a></dt>
  178. <dd><p>Bases: <a class="reference internal" href="CBD.CBD.html#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.CBD.BaseBlock</span></code></a></p>
  179. <p>Abstract class, representing a basic collection unit.
  180. In the data attribute, a set of values is stored for
  181. external access (possibly during the simulation).
  182. This should allow for live plots w.r.t. an independent
  183. plotting framework.</p>
  184. <dl class="method">
  185. <dt id="CBD.lib.endpoints.CollectorBlock.compute">
  186. <code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#CollectorBlock.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.CollectorBlock.compute" title="Permalink to this definition">¶</a></dt>
  187. <dd><p>Computes this block’s operation, based on its inputs and store it as an output
  188. signal.</p>
  189. <table class="docutils field-list" frame="void" rules="none">
  190. <col class="field-name" />
  191. <col class="field-body" />
  192. <tbody valign="top">
  193. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
  194. </tr>
  195. </tbody>
  196. </table>
  197. </dd></dl>
  198. <dl class="method">
  199. <dt id="CBD.lib.endpoints.CollectorBlock.clear">
  200. <code class="descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#CollectorBlock.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.CollectorBlock.clear" title="Permalink to this definition">¶</a></dt>
  201. <dd><p>Clears the contents of the block. Must be called in-between
  202. simulations if the obtainable statistics do not need to
  203. interfere/retain information about previous simulations.</p>
  204. </dd></dl>
  205. </dd></dl>
  206. <dl class="class">
  207. <dt id="CBD.lib.endpoints.SignalCollectorBlock">
  208. <em class="property">class </em><code class="descclassname">CBD.lib.endpoints.</code><code class="descname">SignalCollectorBlock</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#SignalCollectorBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.SignalCollectorBlock" title="Permalink to this definition">¶</a></dt>
  209. <dd><p>Bases: <a class="reference internal" href="#CBD.lib.endpoints.CollectorBlock" title="CBD.lib.endpoints.CollectorBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.lib.endpoints.CollectorBlock</span></code></a></p>
  210. <p>Collects a single signal to store w.r.t. the arrival time.</p>
  211. <dl class="method">
  212. <dt id="CBD.lib.endpoints.SignalCollectorBlock.compute">
  213. <code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#SignalCollectorBlock.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.SignalCollectorBlock.compute" title="Permalink to this definition">¶</a></dt>
  214. <dd><p>Computes this block’s operation, based on its inputs and store it as an output
  215. signal.</p>
  216. <table class="docutils field-list" frame="void" rules="none">
  217. <col class="field-name" />
  218. <col class="field-body" />
  219. <tbody valign="top">
  220. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
  221. </tr>
  222. </tbody>
  223. </table>
  224. </dd></dl>
  225. <dl class="method">
  226. <dt id="CBD.lib.endpoints.SignalCollectorBlock.clear">
  227. <code class="descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#SignalCollectorBlock.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.SignalCollectorBlock.clear" title="Permalink to this definition">¶</a></dt>
  228. <dd><p>Clears the contents of the block. Must be called in-between
  229. simulations if the obtainable statistics do not need to
  230. interfere/retain information about previous simulations.</p>
  231. </dd></dl>
  232. <dl class="attribute">
  233. <dt id="CBD.lib.endpoints.SignalCollectorBlock.data_xy">
  234. <code class="descname">data_xy</code><a class="headerlink" href="#CBD.lib.endpoints.SignalCollectorBlock.data_xy" title="Permalink to this definition">¶</a></dt>
  235. <dd><p>The collected data, as a pair of lists; i.e. the unzipped form of
  236. <code class="code docutils literal notranslate"><span class="pre">xs,</span> <span class="pre">ys</span></code>.</p>
  237. </dd></dl>
  238. </dd></dl>
  239. <dl class="class">
  240. <dt id="CBD.lib.endpoints.PositionCollectorBlock">
  241. <em class="property">class </em><code class="descclassname">CBD.lib.endpoints.</code><code class="descname">PositionCollectorBlock</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#PositionCollectorBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.PositionCollectorBlock" title="Permalink to this definition">¶</a></dt>
  242. <dd><p>Bases: <a class="reference internal" href="#CBD.lib.endpoints.CollectorBlock" title="CBD.lib.endpoints.CollectorBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.lib.endpoints.CollectorBlock</span></code></a></p>
  243. <p>Collects a X/Y position.</p>
  244. <dl class="method">
  245. <dt id="CBD.lib.endpoints.PositionCollectorBlock.compute">
  246. <code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#PositionCollectorBlock.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.PositionCollectorBlock.compute" title="Permalink to this definition">¶</a></dt>
  247. <dd><p>Computes this block’s operation, based on its inputs and store it as an output
  248. signal.</p>
  249. <table class="docutils field-list" frame="void" rules="none">
  250. <col class="field-name" />
  251. <col class="field-body" />
  252. <tbody valign="top">
  253. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
  254. </tr>
  255. </tbody>
  256. </table>
  257. </dd></dl>
  258. <dl class="method">
  259. <dt id="CBD.lib.endpoints.PositionCollectorBlock.clear">
  260. <code class="descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#PositionCollectorBlock.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.PositionCollectorBlock.clear" title="Permalink to this definition">¶</a></dt>
  261. <dd><p>Clears the contents of the block. Must be called in-between
  262. simulations if the obtainable statistics do not need to
  263. interfere/retain information about previous simulations.</p>
  264. </dd></dl>
  265. <dl class="method">
  266. <dt id="CBD.lib.endpoints.PositionCollectorBlock.distance_from_last">
  267. <code class="descname">distance_from_last</code><span class="sig-paren">(</span><em>x1</em>, <em>y1</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#PositionCollectorBlock.distance_from_last"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.PositionCollectorBlock.distance_from_last" title="Permalink to this definition">¶</a></dt>
  268. <dd></dd></dl>
  269. <dl class="method">
  270. <dt id="CBD.lib.endpoints.PositionCollectorBlock.distance_from_start">
  271. <code class="descname">distance_from_start</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#PositionCollectorBlock.distance_from_start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.PositionCollectorBlock.distance_from_start" title="Permalink to this definition">¶</a></dt>
  272. <dd></dd></dl>
  273. <dl class="attribute">
  274. <dt id="CBD.lib.endpoints.PositionCollectorBlock.data_xy">
  275. <code class="descname">data_xy</code><a class="headerlink" href="#CBD.lib.endpoints.PositionCollectorBlock.data_xy" title="Permalink to this definition">¶</a></dt>
  276. <dd><p>The collected data, as a pair of lists; i.e. the unzipped form of
  277. <code class="code docutils literal notranslate"><span class="pre">xs,</span> <span class="pre">ys</span></code>.</p>
  278. </dd></dl>
  279. </dd></dl>
  280. <dl class="class">
  281. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock">
  282. <em class="property">class </em><code class="descclassname">CBD.lib.endpoints.</code><code class="descname">StatisticsCollectorBlock</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock" title="Permalink to this definition">¶</a></dt>
  283. <dd><p>Bases: <a class="reference internal" href="#CBD.lib.endpoints.CollectorBlock" title="CBD.lib.endpoints.CollectorBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.lib.endpoints.CollectorBlock</span></code></a></p>
  284. <p>Collects all inputs and allows for statistical data summaries.</p>
  285. <p>While this can be done on the <a class="reference internal" href="#CBD.lib.endpoints.SignalCollectorBlock" title="CBD.lib.endpoints.SignalCollectorBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">SignalCollectorBlock</span></code></a>,
  286. this class uses a less memory-intensive algorithm to do so.
  287. When only statistical info is required and a lot of data needs to
  288. be analyzed, this algorithm should be used!</p>
  289. <div class="admonition note">
  290. <p class="first admonition-title">Note</p>
  291. <p class="last">This block only works for <strong>NUMERICAL</strong> data.</p>
  292. </div>
  293. <dl class="method">
  294. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.compute">
  295. <code class="descname">compute</code><span class="sig-paren">(</span><em>curIteration</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.compute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.compute" title="Permalink to this definition">¶</a></dt>
  296. <dd><p>Computes this block’s operation, based on its inputs and store it as an output
  297. signal.</p>
  298. <table class="docutils field-list" frame="void" rules="none">
  299. <col class="field-name" />
  300. <col class="field-body" />
  301. <tbody valign="top">
  302. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>curIteration</strong> (<em>int</em>) – The iteration at which we must compute this value.</td>
  303. </tr>
  304. </tbody>
  305. </table>
  306. </dd></dl>
  307. <dl class="method">
  308. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.clear">
  309. <code class="descname">clear</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.clear" title="Permalink to this definition">¶</a></dt>
  310. <dd><p>Resets the values of the statistics.
  311. Should be called when the model is used in multiple
  312. simulations back-to-back to make sure the statistics
  313. remain valid.</p>
  314. </dd></dl>
  315. <dl class="method">
  316. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.count">
  317. <code class="descname">count</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.count"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.count" title="Permalink to this definition">¶</a></dt>
  318. <dd><p>Returns the amount of items that have been captured.</p>
  319. </dd></dl>
  320. <dl class="method">
  321. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.min">
  322. <code class="descname">min</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.min"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.min" title="Permalink to this definition">¶</a></dt>
  323. <dd><p>Returns the smallest value that was seen.</p>
  324. </dd></dl>
  325. <dl class="method">
  326. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.max">
  327. <code class="descname">max</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.max"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.max" title="Permalink to this definition">¶</a></dt>
  328. <dd><p>Returns the largest value that was seen.</p>
  329. </dd></dl>
  330. <dl class="method">
  331. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.sum">
  332. <code class="descname">sum</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.sum"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.sum" title="Permalink to this definition">¶</a></dt>
  333. <dd><p>Returns the sum of all items that have been captured.</p>
  334. </dd></dl>
  335. <dl class="method">
  336. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.sumOfSquares">
  337. <code class="descname">sumOfSquares</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.sumOfSquares"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.sumOfSquares" title="Permalink to this definition">¶</a></dt>
  338. <dd><p>Returns the sum of the squares for all items that have been captured.</p>
  339. </dd></dl>
  340. <dl class="method">
  341. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.mean">
  342. <code class="descname">mean</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.mean"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.mean" title="Permalink to this definition">¶</a></dt>
  343. <dd><p>Returns the average/mean value of the data.</p>
  344. </dd></dl>
  345. <dl class="method">
  346. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.variance">
  347. <code class="descname">variance</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.variance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.variance" title="Permalink to this definition">¶</a></dt>
  348. <dd><p>Returns the variance of the data.</p>
  349. </dd></dl>
  350. <dl class="method">
  351. <dt id="CBD.lib.endpoints.StatisticsCollectorBlock.std">
  352. <code class="descname">std</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/endpoints.html#StatisticsCollectorBlock.std"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.endpoints.StatisticsCollectorBlock.std" title="Permalink to this definition">¶</a></dt>
  353. <dd><p>Returns the standard deviation value of the data.</p>
  354. </dd></dl>
  355. </dd></dl>
  356. </div>
  357. </article>
  358. </div>
  359. <footer>
  360. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  361. <a href="CBD.CBD.html" class="btn btn-neutral float-right" title="CBD.CBD module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
  362. <a href="CBD.lib.io.html" class="btn btn-neutral" title="CBD.lib.io module" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
  363. </div>
  364. <hr>
  365. <div role="contentinfo">
  366. <p>
  367. &copy; Copyright 2020, Randy Paredis.
  368. </p>
  369. </div>
  370. <div>
  371. Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  372. </div>
  373. </footer>
  374. </div>
  375. </div>
  376. <div class="catalyst-content-right" id="catalyst-content-right">
  377. <div class="catalyst-right-menu" id="catalyst-right-menu">
  378. <div class="catalyst-side-scroll" id="catalyst-side-scroll-right">
  379. <ul>
  380. <li><a class="reference internal" href="#">CBD.lib.endpoints module</a></li>
  381. </ul>
  382. </div>
  383. </div>
  384. </div>
  385. </section>
  386. </div>
  387. <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
  388. <script type="text/javascript" src="_static/jquery.js"></script>
  389. <script type="text/javascript" src="_static/underscore.js"></script>
  390. <script type="text/javascript" src="_static/doctools.js"></script>
  391. <script type="text/javascript" src="_static/language_data.js"></script>
  392. <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  393. <script type="text/javascript" src="_static/js/vendor/popper.min.js"></script>
  394. <script type="text/javascript" src="_static/js/vendor/bootstrap.min.js"></script>
  395. <script type="text/javascript" src="_static/js/theme.js"></script>
  396. <script type="text/javascript">
  397. jQuery(function () {
  398. SphinxRtdTheme.Navigation.enable(true);
  399. });
  400. </script>
  401. <!-- Begin Footer -->
  402. <footer class="site-footer" id="site-footer">
  403. <div class="container footer-container">
  404. <div class="footer-logo-wrapper">
  405. <a href="https://catalyst-team.com/" class="footer-logo"></a>
  406. </div>
  407. <div class="footer-links-wrapper">
  408. <div class="footer-links-col">
  409. <ul>
  410. <li class="list-title"><a href="https://github.com/catalyst-team">Ecosystem</a></li>
  411. <li><a class="nav-dropdown-item" href="https://alchemy.host">Alchemy</a></li>
  412. <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/catalyst">Catalyst</a></li>
  413. <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/reaction">Reaction</a></li>
  414. </ul>
  415. </div>
  416. <div class="footer-links-col">
  417. <ul>
  418. <li class="list-title"><a href="https://github.com/catalyst-team">Projects</a></li>
  419. <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/codestyle">Codestyle</a></li>
  420. <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/neuro">Catalyst.Neuro</a></li>
  421. <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/classification">Classification</a></li>
  422. <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/detection">Detection</a></li>
  423. <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/segmentation">Segmentation</a></li>
  424. <li><a class="nav-dropdown-item" href="https://github.com/catalyst-team/gan">Catalyst.GAN</a></li>
  425. </ul>
  426. </div>
  427. <div class="footer-links-col">
  428. <ul>
  429. <li class="list-title"><a href="https://catalyst-team.com/">Support</a></li>
  430. <li><a href="https://github.com/catalyst-team/catalyst/issues" target="_blank">Github Issues</a></li>
  431. <li><a href="https://github.com/catalyst-team/catalyst/blob/master/CONTRIBUTING.md" target="_blank">Contributing</a></li>
  432. <li><a href="https://www.patreon.com/catalyst_team" target="_blank">Patreon</a></li>
  433. </ul>
  434. </div>
  435. <div class="footer-links-col follow-us-col">
  436. <div class="footer-social-icons">
  437. <a href="https://t.me/catalyst_team" target="_blank" class="telegram"></a>
  438. <a href="https://twitter.com/catalyst_core" target="_blank" class="twitter"></a>
  439. <a href="https://join.slack.com/t/catalyst-team-core/shared_invite/zt-d9miirnn-z86oKDzFMKlMG4fgFdZafw" target="_blank" class="ods"></a>
  440. </div>
  441. </div>
  442. </div>
  443. </div>
  444. </footer>
  445. <!-- End Footer -->
  446. <!-- Begin Mobile Menu -->
  447. <div class="mobile-main-menu">
  448. <div class="container-fluid">
  449. <div class="container">
  450. <div class="mobile-main-menu-header-container">
  451. <a class="header-logo" href="https://catalyst-team.com/" aria-label="Catalyst"></a>
  452. <a class="main-menu-close-button" href="#" data-behavior="close-mobile-menu"></a>
  453. </div>
  454. </div>
  455. </div>
  456. <div class="mobile-main-menu-links-container">
  457. <div class="main-menu">
  458. <ul>
  459. <li>
  460. <a href="">Get Started</a>
  461. </li>
  462. <li>
  463. <a href="https://github.com/catalyst-team/catalyst">Github</a>
  464. </li>
  465. </ul>
  466. </div>
  467. </div>
  468. </div>
  469. <!-- End Mobile Menu -->
  470. <script type="text/javascript" src="_static/js/vendor/anchor.min.js"></script>
  471. <script type="text/javascript">
  472. $(document).ready(function() {
  473. mobileMenu.bind();
  474. mobileTOC.bind();
  475. catalystAnchors.bind();
  476. sideMenus.bind();
  477. scrollToAnchor.bind();
  478. highlightNavigation.bind();
  479. mainMenuDropdown.bind();
  480. // Add class to links that have code blocks, since we cannot create links in code blocks
  481. $("article.catalyst-article a span.pre").each(function(e) {
  482. $(this).closest("a").addClass("has-code");
  483. });
  484. })
  485. </script>
  486. </body>
  487. </html>