Skip to content

Commit 8f5f6ba

Browse files
Apply suggestions from code review
Co-authored-by: David Müller-Widmann <[email protected]>
1 parent 0014a2f commit 8f5f6ba

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

benchmark/benchmarks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const SUITE = BenchmarkGroup()
44

55
SUITE["random"] = BenchmarkGroup()
66

7-
for i in 2:4
7+
for i in 2:6
88
n = 10^i
99
x = rand(MersenneTwister(42), n)
1010
y = sqrt.(x)

src/Loess.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ function predict(
299299
else
300300
[s * norm(_hatmatrix_x(model, _x)) for _x in x_v]
301301
end
302-
lower = [_x - qt * _sₓ for (_x, _sₓ) in zip(predictions, sₓ)]
302+
lower = muladd(-qt, sₓ, predictions)
303303
upper = [_x + qt * _sₓ for (_x, _sₓ) in zip(predictions, sₓ)]
304304
return LoessPrediction(predictions, lower, upper, sₓ, δ₁, δ₂, s, ρ)
305305
end

0 commit comments

Comments
 (0)