Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/julia-format@master
- uses: julia-actions/julia-format@v2
6 changes: 3 additions & 3 deletions src/loss/WLS/WLS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Weighted least squares estimation.
- `approximate_hessian::Bool`: should the hessian be swapped for an approximation
- `wls_weight_matrix`: the weight matrix for weighted least squares.
Defaults to GLS estimation (``0.5*(D^T*kron(S,S)*D)`` where D is the duplication matrix
and S is the inverse ob the observed covariance matrix)
and S is the inverse of the observed covariance matrix)
- `wls_weight_matrix_mean`: the weight matrix for the mean part of weighted least squares.
Defaults to GLS estimation (the inverse of the observed covariance matrix)

Expand Down Expand Up @@ -171,8 +171,8 @@ function objective_gradient!(semwls::SemWLS, par, model::AbstractSemSingle, has_
gradient = -2*(σ₋'*V*∇σ + μ₋'*V_μ*∇μ)'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
gradient = -2*(σ₋'*V*∇σ + μ₋'*V_μ*∇μ)'
gradient = -2 * (σ₋' * V * ∇σ + μ₋' * V_μ * ∇μ)'

return objective, gradient
else
objective = dot(σ₋, V, σ₋)
gradient = -2*(σ₋'*V*∇σ)'
objective = dot(σ₋, V, σ₋)
gradient = -2*(σ₋'*V* ∇σ)'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
gradient = -2*(σ₋'*V* ∇σ)'
gradient = -2 * (σ₋' * V * ∇σ)'

return objective, gradient
end
end
Expand Down