Skip to content

Commit

Permalink
Merge pull request #111 from stanweer1/test_release
Browse files Browse the repository at this point in the history
Stochastic Bifurcation Code and Documentation
  • Loading branch information
lizliz authored May 20, 2024
2 parents aaab45a + b7d3ae8 commit 8ceb571
Show file tree
Hide file tree
Showing 60 changed files with 1,331 additions and 333 deletions.
1 change: 1 addition & 0 deletions doc_source/SP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ The signal processing module include various methods of analyzing a time series.
Information Module <information.rst>
Miscellaneous <misc.rst>
Texture Analysis <texture_analysis.rst>
Stochastic P-Bifurcation Detection <stoch_bif.md>
12 changes: 9 additions & 3 deletions doc_source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
from unittest import mock
sys.modules['ripser'] = mock.Mock()


# -- Project information -----------------------------------------------------

project = 'teaspoon'
copyright = '2020, Munch'
author = 'Elizabeth Munch'
release = '1.3.7'
release = '1.5.3'

source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

# -- General configuration ---------------------------------------------------
extensions = ['sphinx.ext.autodoc',
Expand All @@ -40,8 +43,11 @@
'sphinxcontrib.bibtex',
'sphinx-prompt',
'nbsphinx',
'IPython.sphinxext.ipython_console_highlighting']
'IPython.sphinxext.ipython_console_highlighting',
'myst_parser']

# Add any paths that contain templates here, relative to this directory.
myst_heading_anchors = 5
templates_path = ['_templates']
exclude_patterns = []
bibtex_bibfiles = ['references.bib']
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions doc_source/stoch_bif.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Stochastic P-Bifurcation Detection

Stochastic P-bifurcations are points of topological changes in the joint probability density function (PDF) of a stochastic system. Please cite the papers [“A topological framework for identifying phenomenological bifurcations in stochastic dynamical systems”](https://doi.org/10.1007/s11071-024-09289-1) and [“Topological Detection of Phenomenological Bifurcations with Unreliable Kernel Densities”](https://doi.org/10.48550/arXiv.2401.16563) when using these functions. These modules can be used to detect P-bifurcation given

- [Analytical Densities](#analytical-density)

## Analytical Density

Given the analytical PDFs, the homological bifurcation plot can be generated with the module below

```{eval-rst}
.. automodule:: teaspoon.SP.StochasticP
:members: analytical_homological_bifurcation_plot
```

### Example

The following example plots an analytical bifurcation plot for a set of PDFs where the system shifts from a monostability to a limit cycle:

```python
import numpy as np
from teaspoon.SP.StochasticP import analytical_homological_bifurcation_plot
X, Y = np.meshgrid(np.linspace(-3,3,100), np.linspace(-3,3,100))
factors = np.linspace(-1,1,20)

PDFs = []
for h in factors:

p = np.exp(-0.5*((X**2+Y**2)**2 + h*(X**2 + Y**2)))
PDFs.append(p)

M = analytical_homological_bifurcation_plot(PDFs, bifurcation_parameters=factors, dimensions=[1], filter=0.02, maxEps=1, numStops=100, plotting=True)
```

The output for this example is

```{image} figures/analytical_homological_plot.png
:alt: Analytical Homological Plot
:width: 300px
:align: left
```
Binary file added docs/.doctrees/AC.doctree
Binary file not shown.
Binary file added docs/.doctrees/CL.doctree
Binary file not shown.
Binary file added docs/.doctrees/CL_CC.doctree
Binary file not shown.
Binary file added docs/.doctrees/CL_KM.doctree
Binary file not shown.
Binary file added docs/.doctrees/CL_PI.doctree
Binary file not shown.
Binary file added docs/.doctrees/CL_PL.doctree
Binary file not shown.
Binary file added docs/.doctrees/CL_PS.doctree
Binary file not shown.
Binary file added docs/.doctrees/CL_TF.doctree
Binary file not shown.
Binary file added docs/.doctrees/DS.doctree
Binary file not shown.
Binary file added docs/.doctrees/DynSysLib.doctree
Binary file not shown.
Binary file added docs/.doctrees/FNN.doctree
Binary file not shown.
Binary file added docs/.doctrees/FSA.doctree
Binary file not shown.
Binary file added docs/.doctrees/F_PD.doctree
Binary file not shown.
Binary file added docs/.doctrees/MI.doctree
Binary file not shown.
Binary file added docs/.doctrees/ML.doctree
Binary file not shown.
Binary file added docs/.doctrees/MakeData.doctree
Binary file not shown.
Binary file added docs/.doctrees/MsPE.doctree
Binary file not shown.
Binary file added docs/.doctrees/PAMI.doctree
Binary file not shown.
Binary file added docs/.doctrees/PHN.doctree
Binary file not shown.
Binary file added docs/.doctrees/PointCloud.doctree
Binary file not shown.
Binary file added docs/.doctrees/SP.doctree
Binary file not shown.
Binary file added docs/.doctrees/TDA.doctree
Binary file not shown.
Binary file added docs/.doctrees/citing.doctree
Binary file not shown.
Binary file added docs/.doctrees/contributing.doctree
Binary file not shown.
Binary file added docs/.doctrees/distances.doctree
Binary file not shown.
Binary file added docs/.doctrees/drawing.doctree
Binary file not shown.
Binary file added docs/.doctrees/environment.pickle
Binary file not shown.
Binary file added docs/.doctrees/index.doctree
Binary file not shown.
Binary file added docs/.doctrees/information.doctree
Binary file not shown.
Binary file added docs/.doctrees/installation.doctree
Binary file not shown.
Binary file added docs/.doctrees/license.doctree
Binary file not shown.
Binary file added docs/.doctrees/magnitude.doctree
Binary file not shown.
Binary file added docs/.doctrees/misc.doctree
Binary file not shown.
Binary file added docs/.doctrees/modules.doctree
Binary file not shown.
277 changes: 277 additions & 0 deletions docs/.doctrees/nbsphinx/notebooks/distance.ipynb

Large diffs are not rendered by default.

Binary file added docs/.doctrees/network.doctree
Binary file not shown.
Binary file added docs/.doctrees/parameter_selection.doctree
Binary file not shown.
Binary file added docs/.doctrees/persistence.doctree
Binary file not shown.
Binary file added docs/.doctrees/sample_md.doctree
Binary file not shown.
Binary file added docs/.doctrees/stoch_bif.doctree
Binary file not shown.
Binary file added docs/.doctrees/stochastic_bifurcation.doctree
Binary file not shown.
Binary file not shown.
Binary file added docs/.doctrees/texture_analysis.doctree
Binary file not shown.
Binary file added docs/.doctrees/tsa.doctree
Binary file not shown.
113 changes: 58 additions & 55 deletions docs/SP.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,40 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>2.4. Signal Processing (SP) Module Documentation &mdash; teaspoon 1.3.7 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/plot_directive.css" />


<title>2.2. Signal Processing (SP) Module Documentation &mdash; teaspoon 1.3.7 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/plot_directive.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->

<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=d4a0791e"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script>window.MathJax = {"tex": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true}, "options": {"ignoreHtmlClass": "tex2jax_ignore|mathjax_ignore|document", "processHtmlClass": "tex2jax_process|mathjax_process|math|output_area"}}</script>
<script defer="defer" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="2.4.1. Time Series Analysis (TSA) Tools" href="tsa.html" />
<link rel="prev" title="2.3.6. Magnitude" href="magnitude.html" />
<link rel="next" title="2.2.1. Time Series Analysis (TSA) Tools" href="tsa.html" />
<link rel="prev" title="2.1.6. False Nearest Neighbors (FNN) for dimension (n)." href="FNN.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: white" >



<a href="index.html" class="icon icon-home">
teaspoon
<img src="_static/teaspoon.png" class="logo" alt="Logo"/>
<a href="index.html" class="icon icon-home"> teaspoon
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
Expand Down Expand Up @@ -77,33 +70,18 @@
<li class="toctree-l3"><a class="reference internal" href="FNN.html#teaspoon.parameter_selection.FNN_n.FNN_n"><code class="docutils literal notranslate"><span class="pre">FNN_n()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="ML.html">2.2. Machine Learning (ML) Module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="DS.html">2.2.1. Datasets</a></li>
<li class="toctree-l3"><a class="reference internal" href="F_PD.html">2.2.2. Featurization</a></li>
<li class="toctree-l3"><a class="reference internal" href="CL.html">2.2.3. Classification</a></li>
<li class="toctree-l3"><a class="reference internal" href="ML.html#references">2.2.4. References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="TDA.html">2.3. Topological Data Analaysis (TDA) Module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="PHN.html">2.3.1. Persistent Homology of Networks (PHN) Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="distances.html">2.3.2. Distances</a></li>
<li class="toctree-l3"><a class="reference internal" href="drawing.html">2.3.3. Drawing</a></li>
<li class="toctree-l3"><a class="reference internal" href="persistence.html">2.3.4. Persistence</a></li>
<li class="toctree-l3"><a class="reference internal" href="sublevel_set_persistence.html">2.3.5. Zero Dimensional Sublevel Set Persistence (SLSP) Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="magnitude.html">2.3.6. Magnitude</a></li>
</ul>
</li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">2.4. Signal Processing (SP) Module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="tsa.html">2.4.1. Time Series Analysis (TSA) Tools</a></li>
<li class="toctree-l3"><a class="reference internal" href="network.html">2.4.2. Network Representation of Time Series</a></li>
<li class="toctree-l3"><a class="reference internal" href="information.html">2.4.3. Information Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="misc.html">2.4.4. Miscellaneous</a></li>
<li class="toctree-l3"><a class="reference internal" href="texture_analysis.html">2.4.5. Texture Analysis</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">2.2. Signal Processing (SP) Module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="tsa.html">2.2.1. Time Series Analysis (TSA) Tools</a></li>
<li class="toctree-l3"><a class="reference internal" href="network.html">2.2.2. Network Representation of Time Series</a></li>
<li class="toctree-l3"><a class="reference internal" href="information.html">2.2.3. Information Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="misc.html">2.2.4. Miscellaneous</a></li>
<li class="toctree-l3"><a class="reference internal" href="texture_analysis.html">2.2.5. Texture Analysis</a></li>
<li class="toctree-l3"><a class="reference internal" href="stoch_bif.html">2.2.6. Stochastic P-Bifurcation Detection</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="MakeData.html">2.5. Make Data (MakeData) Module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="PointCloud.html">2.5.1. Point Cloud Data Generation (PointCloud) Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="DynSysLib.html">2.5.2. Dynamic Systems Library (DynSysLib) Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="MakeData.html">2.3. Make Data (MakeData) Module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="PointCloud.html">2.3.1. Point Cloud Data Generation (PointCloud) Module</a></li>
<li class="toctree-l3"><a class="reference internal" href="DynSysLib.html">2.3.2. Dynamic Systems Library (DynSysLib) Module</a></li>
</ul>
</li>
</ul>
Expand All @@ -129,9 +107,9 @@
<div class="rst-content style-external-links">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li><a href="index.html" class="icon icon-home"></a></li>
<li class="breadcrumb-item"><a href="modules.html"><span class="section-number">2. </span>Table of Contents</a></li>
<li class="breadcrumb-item active"><span class="section-number">2.4. </span>Signal Processing (SP) Module Documentation</li>
<li class="breadcrumb-item active"><span class="section-number">2.2. </span>Signal Processing (SP) Module Documentation</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/SP.rst.txt" rel="nofollow"> View page source</a>
</li>
Expand All @@ -141,16 +119,41 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="signal-processing-sp-module-documentation">
<span id="sp"></span><h1><span class="section-number">2.4. </span>Signal Processing (SP) Module Documentation<a class="headerlink" href="#signal-processing-sp-module-documentation" title="Link to this heading"></a></h1>

<style>
/* CSS overrides for sphinx_rtd_theme */

/* 24px margin */
.nbinput.nblast.container,
.nboutput.nblast.container {
margin-bottom: 19px; /* padding has already 5px */
}

/* ... except between code cells! */
.nblast.container + .nbinput.container {
margin-top: -19px;
}

.admonition > p:before {
margin-right: 4px; /* make room for the exclamation icon */
}

/* Fix math alignment, see https://github.com/rtfd/sphinx_rtd_theme/pull/686 */
.math {
text-align: unset;
}
</style>
<section id="signal-processing-sp-module-documentation">
<span id="sp"></span><h1><span class="section-number">2.2. </span>Signal Processing (SP) Module Documentation<a class="headerlink" href="#signal-processing-sp-module-documentation" title="Link to this heading"></a></h1>
<p>The signal processing module include various methods of analyzing a time series. The included modules are in the table of contents below. More description of each module is available at each sub-modules page.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="tsa.html">2.4.1. Time Series Analysis (TSA) Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="network.html">2.4.2. Network Representation of Time Series</a></li>
<li class="toctree-l1"><a class="reference internal" href="information.html">2.4.3. Information Module</a></li>
<li class="toctree-l1"><a class="reference internal" href="misc.html">2.4.4. Miscellaneous</a></li>
<li class="toctree-l1"><a class="reference internal" href="texture_analysis.html">2.4.5. Texture Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="tsa.html">2.2.1. Time Series Analysis (TSA) Tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="network.html">2.2.2. Network Representation of Time Series</a></li>
<li class="toctree-l1"><a class="reference internal" href="information.html">2.2.3. Information Module</a></li>
<li class="toctree-l1"><a class="reference internal" href="misc.html">2.2.4. Miscellaneous</a></li>
<li class="toctree-l1"><a class="reference internal" href="texture_analysis.html">2.2.5. Texture Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="stoch_bif.html">2.2.6. Stochastic P-Bifurcation Detection</a></li>
</ul>
</div>
</section>
Expand All @@ -159,8 +162,8 @@
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="magnitude.html" class="btn btn-neutral float-left" title="2.3.6. Magnitude" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="tsa.html" class="btn btn-neutral float-right" title="2.4.1. Time Series Analysis (TSA) Tools" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="FNN.html" class="btn btn-neutral float-left" title="2.1.6. False Nearest Neighbors (FNN) for dimension (n)." accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="tsa.html" class="btn btn-neutral float-right" title="2.2.1. Time Series Analysis (TSA) Tools" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>
Expand Down
Binary file added docs/_images/analytical_homological_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8ceb571

Please sign in to comment.