You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on modeling the unknown physics of a non-autonomous system. The system has 5 states and 2 control inputs. The dynamics of states 1 to 3 are known precisely but those of states 4 and 5 are unknown. I collected some simulation data and modeled the unknown dynamics with a feedforward neural network. Upon training, the neural network approximates the unknown physics quite well as shown below.
Now my next step is to use Sparse Regression for model disvovery. I am using the following code
@variables u[1:5] c[1:2]
u = collect(u)
c = collect(c)
h = Num[polynomial_basis(u, 2); polynomial_basis(c, 2)]
basis = Basis(h, u, controls = c)
## Ŷ is the neural network output for the sequence of states X̂
nn_problem = DirectDataDrivenProblem(X̂[:,1:end-1], Ŷ, U=U)
sampler = DataProcessing(split = 0.8, shuffle = true, batchsize = 30, rng = rng)
λs = exp10.(-10:0.1:0)
opt = STLSQ(λs)
res = solve(nn_problem, basis, opt,
options = DataDrivenCommonOptions(data_processing = sampler, digits = 1))
nn_eqs = get_basis(res)
# Evaluate for some state and control input
nn_eqs(X, get_parameter_map(nn_eqs), U[:,1])
Hi everyone,
I am working on modeling the unknown physics of a non-autonomous system. The system has 5 states and 2 control inputs. The dynamics of states 1 to 3 are known precisely but those of states 4 and 5 are unknown. I collected some simulation data and modeled the unknown dynamics with a feedforward neural network. Upon training, the neural network approximates the unknown physics quite well as shown below.
Now my next step is to use Sparse Regression for model disvovery. I am using the following code
but I get this error
I would really appreciate guidance to mitigate this error.
The text was updated successfully, but these errors were encountered: