Skip to content

Commit

Permalink
2.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Sep 23, 2023
1 parent 6f82fae commit 938908d
Show file tree
Hide file tree
Showing 49 changed files with 364 additions and 323 deletions.
Binary file modified docs/pages/doctrees/Abstract.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Caerus.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Coding quality.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Denoise.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Documentation.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Examples.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Installation.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Mask.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Peakdetect.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Performance.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Plots.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Pre-processing.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Topology.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/Use-cases.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/pages/doctrees/findpeaks.findpeaks.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/pages/doctrees/sponsor.doctree
Binary file not shown.
14 changes: 7 additions & 7 deletions docs/pages/html/Abstract.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=816012cb"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand All @@ -36,7 +36,7 @@
findpeaks
</a>
<div class="version">
2.4.7
2.5.3
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -149,7 +149,7 @@
<div itemprop="articleBody">

<section id="abstract">
<h1>Abstract<a class="headerlink" href="#abstract" title="Permalink to this heading"></a></h1>
<h1>Abstract<a class="headerlink" href="#abstract" title="Link to this heading"></a></h1>
<dl class="simple">
<dt>Background</dt><dd><p>The detection of peaks is a well known challange across various domains. Peaks indicate significant events such as sudden increase in price/volume, sharp rise in demand, bursts in data traffic. Most routinely used detection methods do not employ any assumption for peak shapes or baseline noise. All the information these peak detection methods use is that peak is a signal that goes up and comes down. A peak is detected when a threshold is exceeded[1].</p>
</dd>
Expand Down
22 changes: 11 additions & 11 deletions docs/pages/html/Caerus.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=816012cb"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand All @@ -36,7 +36,7 @@
findpeaks
</a>
<div class="version">
2.4.7
2.5.3
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -153,7 +153,7 @@
<div itemprop="articleBody">

<section id="caerus">
<h1>Caerus<a class="headerlink" href="#caerus" title="Permalink to this heading"></a></h1>
<h1>Caerus<a class="headerlink" href="#caerus" title="Link to this heading"></a></h1>
<p><code class="docutils literal notranslate"><span class="pre">Caerus</span></code> is a python package [1] that determines the local-minima with the corresponding local-maxima independent of the timeframe, scale or trend.
The method is directly incorporated in <code class="docutils literal notranslate"><span class="pre">findpeaks</span></code> and has a strong advantage to find the local maxima and minima in stock-market data.</p>
<p>The detection of peaks and valleys in stockmarket data can be challanging because of its unpredictable behavior.
Expand All @@ -163,7 +163,7 @@ <h1>Caerus<a class="headerlink" href="#caerus" title="Permalink to this heading"
The best scoring percentages is then aggregated by sum per time-point followed by a cut using the threshold. The resulting regions are subsequently detected, and represent the starting-locations of the trade. The stop-locations are determined based on the distance and percentage of te start-locations.</p>
<p>This method works only for one-dimensional data.</p>
<section id="stock-market-data">
<h2>Stock market data<a class="headerlink" href="#stock-market-data" title="Permalink to this heading"></a></h2>
<h2>Stock market data<a class="headerlink" href="#stock-market-data" title="Link to this heading"></a></h2>
<p>For <strong>caerus</strong> method, we can set the minimum percentage (minperc) parameter to declare a starting position with window relevant.
The window size is used to determine whether there is an increase in percentage. start location + window.
The use of smaller window sizes (eg 50) are able to pickup better local-minima, whereas Larger window sizes (eg 1000) will more stress on global minma.
Expand All @@ -172,7 +172,7 @@ <h2>Stock market data<a class="headerlink" href="#stock-market-data" title="Perm
<span class="kn">from</span> <span class="nn">findpeaks</span> <span class="kn">import</span> <span class="n">findpeaks</span>
<span class="c1"># Initialize findpeaks with cearus method.</span>
<span class="c1"># The default setting is that it only return peaks-vallyes with at least 5% difference. We can change this using params</span>
<span class="n">fp</span> <span class="o">=</span> <span class="n">findpeaks</span><span class="p">(</span><span class="n">method</span><span class="o">=</span><span class="s1">&#39;caerus&#39;</span><span class="p">,</span> <span class="n">params_caerus</span><span class="o">=</span><span class="p">{</span><span class="s1">&#39;minperc&#39;</span><span class="p">:</span><span class="mi">5</span><span class="p">,</span> <span class="s1">&#39;window&#39;</span><span class="p">:</span><span class="mi">50</span><span class="p">})</span>
<span class="n">fp</span> <span class="o">=</span> <span class="n">findpeaks</span><span class="p">(</span><span class="n">method</span><span class="o">=</span><span class="s1">&#39;caerus&#39;</span><span class="p">,</span> <span class="n">params</span><span class="o">=</span><span class="p">{</span><span class="s1">&#39;minperc&#39;</span><span class="p">:</span><span class="mi">5</span><span class="p">,</span> <span class="s1">&#39;window&#39;</span><span class="p">:</span><span class="mi">50</span><span class="p">})</span>
<span class="c1"># Import example data</span>
<span class="n">X</span> <span class="o">=</span> <span class="n">fp</span><span class="o">.</span><span class="n">import_example</span><span class="p">(</span><span class="s1">&#39;facebook&#39;</span><span class="p">)</span>
<span class="c1"># Fit</span>
Expand All @@ -182,7 +182,7 @@ <h2>Stock market data<a class="headerlink" href="#stock-market-data" title="Perm
</pre></div>
</div>
<table class="docutils align-center" id="id1">
<caption><span class="caption-text">Detection of peaks and valleys</span><a class="headerlink" href="#id1" title="Permalink to this table"></a></caption>
<caption><span class="caption-text">Detection of peaks and valleys</span><a class="headerlink" href="#id1" title="Link to this table"></a></caption>
<tbody>
<tr class="row-odd"><td><p><img alt="fig_facebook_minperc5" src="_images/fig_facebook_minperc5.png" /></p></td>
</tr>
Expand Down Expand Up @@ -216,7 +216,7 @@ <h2>Stock market data<a class="headerlink" href="#stock-market-data" title="Perm
<p>The output is a dictionary containing a single dataframe (<em>df</em>) that can be of use for follow-up analysis.</p>
</section>
<section id="references-caerus">
<h2>References Caerus<a class="headerlink" href="#references-caerus" title="Permalink to this heading"></a></h2>
<h2>References Caerus<a class="headerlink" href="#references-caerus" title="Link to this heading"></a></h2>
<blockquote>
<div><ul class="simple">
<li><p>[1] <a class="reference external" href="https://github.com/erdogant/caerus">https://github.com/erdogant/caerus</a></p></li>
Expand Down
22 changes: 11 additions & 11 deletions docs/pages/html/Coding quality.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=816012cb"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand All @@ -36,7 +36,7 @@
findpeaks
</a>
<div class="version">
2.4.7
2.5.3
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -155,14 +155,14 @@
<div itemprop="articleBody">

<section id="coding-quality">
<h1>Coding quality<a class="headerlink" href="#coding-quality" title="Permalink to this heading"></a></h1>
<h1>Coding quality<a class="headerlink" href="#coding-quality" title="Link to this heading"></a></h1>
<p>I value software quality. Higher quality software has fewer defects, better security, and better performance, which leads to happier users who can work more effectively.
Code reviews are an effective method for improving software quality. McConnell (2004) suggests that unit testing finds approximately 25% of defects, function testing 35%, integration testing 45%, and code review 55-60%.
While this means that none of these methods are good enough on their own and that they should be combined, clearly code review is an essential tool here.</p>
<p>This library is therefore developed with several techniques, such as coding styling, low complexity, docstrings, reviews, and unit tests.
Such conventions are helpfull to improve the quality, make the code cleaner and more understandable but alos to trace future bugs, and spot syntax errors.</p>
<section id="library">
<h2>library<a class="headerlink" href="#library" title="Permalink to this heading"></a></h2>
<h2>library<a class="headerlink" href="#library" title="Link to this heading"></a></h2>
<p>The file structure of the generated package looks like:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>path/to/findpeaks/
├──<span class="w"> </span>.gitignore
Expand All @@ -189,13 +189,13 @@ <h2>library<a class="headerlink" href="#library" title="Permalink to this headin
</div>
</section>
<section id="style">
<h2>Style<a class="headerlink" href="#style" title="Permalink to this heading"></a></h2>
<h2>Style<a class="headerlink" href="#style" title="Link to this heading"></a></h2>
<p>This library is compliant with the PEP-8 standards.
PEP stands for Python Enhancement Proposal and sets a baseline for the readability of Python code.
Each public function contains a docstring that is based on numpy standards.</p>
</section>
<section id="complexity">
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this heading"></a></h2>
<h2>Complexity<a class="headerlink" href="#complexity" title="Link to this heading"></a></h2>
<p>This library has been developed by using measures that help decreasing technical debt.
Version 2.1.0 of the <code class="docutils literal notranslate"><span class="pre">findpeaks</span></code> library scored, according the code analyzer: <strong>4.36</strong>, for which values &gt; 0 are good and 10 is a maximum score.
Developing software with low(er) technical dept may take extra development time, but has many advantages:</p>
Expand All @@ -207,7 +207,7 @@ <h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this
</ul>
</section>
<section id="unit-tests">
<h2>Unit tests<a class="headerlink" href="#unit-tests" title="Permalink to this heading"></a></h2>
<h2>Unit tests<a class="headerlink" href="#unit-tests" title="Link to this heading"></a></h2>
<p>The use of unit tests is essential to garantee a consistent output of developed functions.
The following tests are secured using <code class="xref py py-func docutils literal notranslate"><span class="pre">tests.test_findpeaks()</span></code>:</p>
<ul class="simple">
Expand Down
Loading

0 comments on commit 938908d

Please sign in to comment.