From 4e99559711f773d29c73201747027047268f2e49 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Tue, 7 Nov 2023 14:25:32 +0100 Subject: [PATCH] Update least_squares.jl Fix residual definition in test --- test/least_squares.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/least_squares.jl b/test/least_squares.jl index 0b66473..a7003f6 100644 --- a/test/least_squares.jl +++ b/test/least_squares.jl @@ -8,7 +8,7 @@ y_target = true_function(x, θ_true) function loss_function(θ, p) ŷ = true_function(p, θ) - return abs2.(ŷ .- y_target) + return ŷ .- y_target end θ_init = θ_true .+ 0.1