Skip to content

Commit a29cbbf

Browse files
committed
Fix measure orientation bug
1 parent 48813c6 commit a29cbbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/strategies/basic.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ function MLJTuning.models(
166166
) where {T}
167167
n_particles = tuning.n_particles
168168
if !isnothing(history)
169-
sig = MLJTuning.signature(first(history).measure)
169+
sign = MLJTuning.signature(history[1].measure[1])
170170
measurements = Vector{T}(undef, n_particles)
171171
map(history[end-n_particles+1:end]) do h
172-
measurements[h.metadata] = sig * h.measurement[1]
172+
measurements[h.metadata] = sign * h.measurement[1]
173173
end
174174
pbest!(state, tuning, measurements)
175175
gbest!(state, tuning)

0 commit comments

Comments
 (0)