Closed at-chantada closed 3 years ago
Merging #131 (4c2858d) into master (b400aff) will decrease coverage by
0.39%
. The diff coverage is16.66%
.
@@ Coverage Diff @@
## master #131 +/- ##
==========================================
- Coverage 89.93% 89.53% -0.40%
==========================================
Files 18 18
Lines 2940 2953 +13
==========================================
Hits 2644 2644
- Misses 296 309 +13
Impacted Files | Coverage Δ | |
---|---|---|
neurodiffeq/solvers.py | 84.53% <0.00%> (-3.04%) |
:arrow_down: |
neurodiffeq/conditions.py | 93.87% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b400aff...4c2858d. Read the comment docs.
As always, thank you for the great work with the library @shuheng-liu. With respect to the names, there is no particular need for those names really. In the case of r
is just what I came up in the moment to use for a generic vector of length N. And in the case of theta
I followed the notation used on the paper that i mentioned in #118. But of course those names can be changed to be more intuitive, and avoid causing confusion in the future.
There are two modifications to the use of
BundleSolver1D
andBundleIVP
in this pull request.The first is a fix of
BundleIVP
, where it didn't work in the case of a bundle that included conditions for different variables in a system of ODEs. To make the fix, now thebundle_conditions
input takes adict
, where in each entry the key represents the condition, and the corresponding value, the index in the tuple used fortheta_min
andtheta_max
inBundleSolver1D
, where the ranges are indicated for that condition.The second is an improvement, where now it is not necessary to put the initial conditions as inputs in your
ode_system
, when including them in the bundle.To illustrate the changes here is an example where a network is trained to be a solution for the damped harmonic oscillator, with different values for the initial time
t_0
(between -1 and 0) initial positionx1_0
(between 0 and 1) and the initial velocityx2_0
(between 1 and 2):First let's create the analytical solution to check how good is the network once it's trained:
The code to train the network:
Finally some plots: