Comments (4)
The correct option is Mu
here. Y_TLM
is only used for the TLM, while Mu
and Lambda
are the adjoint variables.
from matlode.
Ok, maybe its just not clear to me what is meant with what. I'm sorry. Let's see if we are on the same side notation-wise. If I have the functional
subject to the ODE
,
the corresponding adjoint equations become
And thus the sensitivity w.r.t. p is evaluated with
.
Now the following input arguments are clear to me:
Lambda
argument:
Mu
argument (passed as Jacobian):
DRDY
andDRDP
are self-explanatoryJacp
=> function handle to dfdpJacobian
=> function handle to dfdyQFun
=> function handle to r(y,p)Quadrature
=> function handle that returns initial value of the integral (typically zeros)
I understand that after the solver call, the output contains
Lambda
(value at t=0, i.e. sensitivity of Psi w.r.t. initital states)
Mu
(sensitivity of cost functional w.r.t. parameters)
but in essence without the term that I expected would beY_TLM
, namely
so if I get this right, I would have to add this term manually if
to obtain the "true" sensitivity? Unfortunatley, I'm not able to validate this, because I can't obtain a sensible output for a minimal working example, see Issue #4
from matlode.
I think λ^T(0) dy_0/dp = dΨ/dy_0 * dy_0/dp = dΨ/dp = μ^T. I'm not sure I completely understand your question.
from matlode.
@Steven-Roberts I am confused. I think I am mixing up the continuous and the discrete adjoint formulations... Therefore this is not really an issue in the code but rather an issue of my comprehension. Though I think the result should be equivalent when the adjoining the continuous equations and discretizing afterwards compared to discretizing the problem and ajoining afterwards?
The mu that I have in mind and the output 'Mu' are therefore not the same? "My" mu is the (constant) lagrange multiplier obtained by adjoining the system ODE and initial state to the cost functional (with integral/running costs included in Psi as above)
Now after taking the derivative of L with respect to p and after integration by part one has to set the adjoint ODE with final value as shown above to get rid calculating dy/dp at any time. In the process, one also has to set
to avoid calculating dy/dp@t=0 which leads to the above-mentioned Jacobian/sensitivity but in continuous time. This still leaves me confused with your comment, though. Because the lambda(0) ( and therefore mu, too) is still the sensitivity w.r.t. the initial state and inserting lambda(0)=dPsi/dy0 above would not make sense, or at least it would mean that
I understand if you don't have time to look into this too deeply.
from matlode.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matlode.