-
-
Notifications
You must be signed in to change notification settings - Fork 220
SDE-PINN inverse + strong/weak + improved base solver & docstrings. #956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AstitvaAggarwal
wants to merge
17
commits into
SciML:master
Choose a base branch
from
AstitvaAggarwal:sdepinn
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ChrisRackauckas requesting reviews. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
The Base SDE-PINN solver had the following issues (Fixed them) :
sdephi
.inner_sde_loss
loss construction handling.du_dt
(likesdephi
andinner_sde_loss
) handled only Nested Vector inputs (with nested loops at that).The SDE-PINN solver did not support Inverse solving (
additional_loss
is inadequate). Needed a new loss specification :The SDE-PINN solver ONLY supported weak-solving SDEs, now it can solve for the strong solution at
n
fixed paths :add_rand_coeff_2
for strong solving.add_rand_coeff
for weak solving - This shows pretty good results for the expected solution to the SDE, i still need to figure out the mathematics but in my opinion it has to do with the law of large Numbers, Monte Carlo sampling for the Random coefficients basis in the truncated KKL expansion.Added fields to the returned solver object :
sdephi
inputs created from Dataset used for Inverse solves.sdephi
, trained parameters etc.) viasol.rode_solution
.ensemble_fit
andensemble_inputs
used for solution validation.estimated_sol
field containsMonteCarloMeasurements.Particles
objects created fromensemble_fit
. It is a SDE-PINN output sized Vector.A few plots showing Inverse + strong solving the Geometric Brownian Motion SDE with a dataset consisting of
n=15
paths,dt=0.01
in the timespan(0, 1)
. The solve/training is done on1
generated strong path (we solve over the truncation, therefore generate a set of random coefficients[z_1, z_2, .....z_i]
for each path).The number of paths can be controlled via
sub_batch
arg toNNSDE
.(Ran the solve twice)
Estimated Parameters (the solver's loss formulation for the diffusion parameter is sign invariant, therefore might get a mixed up
+/-
for the final estimated parameter). Here the dataset is as described above (to get values closer toideal_p
increasen
), the PINN collocation loss had a discretizationdt=0.02
. parameter initialization:[0.0, 0.0]
.