Difference between revisions of "Calculate jacobian hessian matrix in sympy exponential decay"

From relax wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
__TOC__
 +
 
== Calculate Jacobian and Hessian matrix in python sympy for exponential decay function ==
 
== Calculate Jacobian and Hessian matrix in python sympy for exponential decay function ==
 
See also:  
 
See also:  
Line 22: Line 24:
 
SBiNLab
 
SBiNLab
  
run by: '''python sympy_test.py'''
+
{{collapsible script
 
+
| type  = Python script
 
+
| title  = The <code>sympy_test.py</code> script.
<source lang="Python">
+
| intro  = Run with: <code>python sympy_test.py</code>
 +
| lang  = python
 +
| script =
 
# Tutorial from: http://scipy-lectures.github.io/advanced/sympy.html
 
# Tutorial from: http://scipy-lectures.github.io/advanced/sympy.html
  
Line 137: Line 141:
 
from sympy import Function, hessian, pprint
 
from sympy import Function, hessian, pprint
 
f = Function('f')(r2eff, i0)
 
f = Function('f')(r2eff, i0)
 
+
}}
</source>
 
  
 
== Tutorial with quadratic chi2 function ==
 
== Tutorial with quadratic chi2 function ==
Line 148: Line 151:
 
SBiNLab
 
SBiNLab
  
run by: '''python sympy_test.py'''
+
{{collapsible script
 
+
| type  = Python script
 
+
| title  = The <code>sympy_test.py</code> script.
<source lang="Python">
+
| intro  = Run with: <code>python sympy_test.py</code>
 +
| lang  = python
 +
| script =
 
# Tutorial from: http://scipy-lectures.github.io/advanced/sympy.html
 
# Tutorial from: http://scipy-lectures.github.io/advanced/sympy.html
  
Line 265: Line 270:
 
------------------------------------------------------------------------------
 
------------------------------------------------------------------------------
 
""" % (d2_chi2_d_r2eff_d_r2eff,d2_chi2_d_r2eff_d_i0, d2_chi2_d_i0_d_r2eff, d2_chi2_d_i0_d_i0) )
 
""" % (d2_chi2_d_r2eff_d_r2eff,d2_chi2_d_r2eff_d_i0, d2_chi2_d_i0_d_r2eff, d2_chi2_d_i0_d_i0) )
</source>
+
}}
 +
 
 +
[[Category:Analysis techniques]]

Latest revision as of 21:48, 21 October 2020

Calculate Jacobian and Hessian matrix in python sympy for exponential decay function

See also:

  1. https://en.wikipedia.org/wiki/Propagation_of_uncertainty
  2. http://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant
  3. http://en.wikipedia.org/wiki/Hessian_matrix
  4. http://maxima-online.org/articles/hessian.html
  5. http://certik.github.io/scipy-2013-tutorial/html/tutorial/basic_operations.html
  6. http://scipy-lectures.github.io/advanced/sympy.html
  7. http://docs.sympy.org/dev/gotchas.html
  8. https://github.com/sympy/sympy/wiki/Faq

Sumpy python installation

Consider for example installing Enthought Canopy

Tutorial with function for weighted difference between function evaluation with fitted parameters and measured values.

Created by:

Troels Emtekær Linnet
PhD student
Copenhagen University
SBiNLab

Tutorial with quadratic chi2 function

Created by:

Troels Emtekær Linnet
PhD student
Copenhagen University
SBiNLab