Skip to content

Bug in the Bayesian inference for PINNs #968

@affans

Description

@affans

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions