-
-
Notifications
You must be signed in to change notification settings - Fork 228
Closed
Labels
Description
Describe the bug 🐞
The method getlogpdf dispatched on GridTraining constructs the grid of points to evaluate the PINN at.
ts = collect(eltype(strategy.dx), tspan[1]:(strategy.dx):tspan[2])
To this time vector, it appends dataset[end - 1] (in the case of an inverse problem)
t = isempty(ltd.dataset) ? ts : vcat(ts, ltd.dataset[end - 1])
The problem is the dataset has the form [x, y, time] (in the 2d case) and so it appends tot he time vector ltd.dataset[end - 1] which is not time but the independent variable y.
I believe this is a bug. Should it not concatenate the last element of dataset? I have dataset defined as
# let's add some noise
x = u[1, :] + (u[1, :]) .* (0.3 .* randn(length(u[1, :])))
y = u[2, :] + (u[2, :]) .* (0.3 .* randn(length(u[2, :])))
dataset = [x, y, time] # noisy data [x, y, time]