@@ -79,7 +79,7 @@ included in the SciML documentation.
79
79
Xs = hcat(sols...)
80
80
81
81
# for axis equal; aspect_ratio = :equal
82
- scatter(Xs[2,:], Xs[4,:], alpha = 0.75, color = :green, label = [ "True Data" nothing] )
82
+ scatter(Xs[2,:], Xs[4,:], alpha = 0.75, color = :green, label = "True Data")
83
83
84
84
.. figure :: img/solutions_1.png
85
85
:align: center
@@ -151,7 +151,7 @@ acting on the object only depend on its velocity, not its position.
151
151
Xs = hcat(sols...)
152
152
153
153
# for axis equal; aspect_ratio = :equal
154
- scatter(Xs[2,:], Xs[4,:], alpha = 0.75, color = :green, label = [ "True Data" nothing] )
154
+ scatter(Xs[2,:], Xs[4,:], alpha = 0.75, color = :green, label = "True Data")
155
155
# savefig("solutions_1.png")
156
156
157
157
# define our activation function, radial basis function
@@ -224,17 +224,17 @@ acting on the object only depend on its velocity, not its position.
224
224
225
225
ts = first(times):(mean(diff(times)) / 2):last(times)
226
226
X̂ = predict(p_trained, inits_g, ts)
227
- scatter(Xs[2,:], Xs[4,:], alpha = 0.75, color = :green, label = [ "True Data" nothing] )
228
- scatter!(X̂[2,:], X̂[4,:], alpha = 0.4, color = :red, label = [ "Prediction" nothing] )
227
+ scatter(Xs[2,:], Xs[4,:], alpha = 0.75, color = :green, label = "True Data")
228
+ scatter!(X̂[2,:], X̂[4,:], alpha = 0.4, color = :red, label = "Prediction")
229
229
230
230
u_test = rand(4)
231
231
X̂_test = predict(p_trained, [u_test], ts)
232
232
prob_test = ODEProblem(dynamics!, u_test, tspan)
233
233
solution_test = solve(prob_test, Vern7(), abstol = 1e-12, reltol = 1e-12, saveat = deltat)
234
234
Xs_test = Array(solution_test)
235
- scatter!(Xs_test[2,:], Xs_test[4,:], alpha = 0.75, color = :blue, label = [ "True Data Test" nothing] )
236
- #scatter(Xs_test[2,:], Xs_test[4,:], alpha = 0.75, color = :blue, label = [ "True Data Test" nothing] )
237
- scatter!(X̂_test[2,:], X̂_test[4,:], alpha = 0.4, color = :yellow, label = [ "Prediction Test" nothing] )
235
+ scatter!(Xs_test[2,:], Xs_test[4,:], alpha = 0.75, color = :blue, label = "True Data Test")
236
+ #scatter(Xs_test[2,:], Xs_test[4,:], alpha = 0.75, color = :blue, label = "True Data Test")
237
+ scatter!(X̂_test[2,:], X̂_test[4,:], alpha = 0.4, color = :yellow, label = "Prediction Test")
238
238
# savefig("solutions_2.png")
239
239
240
240
At the end of the script, we plot the true data and model prediction on the
0 commit comments