Skip to content

Commit ab078a9

Browse files
committed
Bugfix in objective function
1 parent 3d1ace3 commit ab078a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fit/utilities.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ end
411411

412412
function objective(model::DynamicFactorModel, regularizer::NamedTuple)
413413
f = loglikelihood(model)
414-
isnothing(regularizer.factors) || (f += regularizer.factors(loadings(model)))
415-
isnothing(regularizer.mean) || (f += regularizer.mean(slopes(mean(model))))
416-
isnothing(regularizer.error) || (f += regularizer.error(cov(errors(model))))
414+
isnothing(regularizer.factors) || (f -= regularizer.factors(loadings(model)))
415+
isnothing(regularizer.mean) || (f -= regularizer.mean(slopes(mean(model))))
416+
isnothing(regularizer.error) || (f -= regularizer.error(cov(errors(model))))
417417

418418
return f
419419
end

0 commit comments

Comments
 (0)