Skip to content

Commit

Permalink
deploy: 483000e
Browse files Browse the repository at this point in the history
  • Loading branch information
shoepfl committed Jul 6, 2023
1 parent d843f06 commit c832744
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
8 changes: 6 additions & 2 deletions _sources/examples/sbml_example.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ ____________
Here's a code snippet to load your own sbml model and to do the parameter inference:

.. code-block:: python
import numpy as np
from eulerpi.core.model import SBMLModel
from eulerpi.core.inference import inference
model = SBMLModel('model.xml', central_param=[1.0, 1.0], param_limits=[[0.0, 2.0], [0.0, 2.0]], param_names=['k1', 'k2'])
central_param = np.array([1.0, 1.0]) # initial guess, evaluation must have nonzero density
param_limits = np.array([[0.0, 2.0], [0.0, 2.0]])
param_names = ['k1', 'k2']
model = SBMLModel('model.xml', central_param=central_param, param_limits=param_limits, param_names=param_names)
inference(model, 'data.csv')
The attribute :py:attr:`~eulerpi.core.model.SBMLModel.param_names` contains the names of the parameters in the sbml model, for which the inference should be performed.
Expand Down
7 changes: 0 additions & 7 deletions examples/sbml_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ <h2>Specialities<a class="headerlink" href="#specialities" title="Permalink to t
<li><p>No need to write any model code</p></li>
</ul>
<p>Here’s a code snippet to load your own sbml model and to do the parameter inference:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">eulerpi.core.model</span> <span class="kn">import</span> <span class="n">SBMLModel</span>
<span class="kn">from</span> <span class="nn">eulerpi.core.inference</span> <span class="kn">import</span> <span class="n">inference</span>

<span class="n">model</span> <span class="o">=</span> <span class="n">SBMLModel</span><span class="p">(</span><span class="s1">&#39;model.xml&#39;</span><span class="p">,</span> <span class="n">central_param</span><span class="o">=</span><span class="p">[</span><span class="mf">1.0</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">],</span> <span class="n">param_limits</span><span class="o">=</span><span class="p">[[</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">],</span> <span class="p">[</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">]],</span> <span class="n">param_names</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;k1&#39;</span><span class="p">,</span> <span class="s1">&#39;k2&#39;</span><span class="p">])</span>
<span class="n">inference</span><span class="p">(</span><span class="n">model</span><span class="p">,</span> <span class="s1">&#39;data.csv&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>The attribute <code class="xref py py-attr docutils literal notranslate"><span class="pre">param_names</span></code> contains the names of the parameters in the sbml model, for which the inference should be performed.
Per default it contains all parameters from the sbml model file.</p>
<div class="admonition note">
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit c832744

Please sign in to comment.