diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index 34309b612..6a3ec0fa1 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -7,4 +7,4 @@ jobs: code-style: runs-on: ubuntu-latest steps: - - uses: julia-actions/julia-format@master + - uses: julia-actions/julia-format@v2 diff --git a/src/loss/WLS/WLS.jl b/src/loss/WLS/WLS.jl index 2fd053f2d..f7728d8bb 100644 --- a/src/loss/WLS/WLS.jl +++ b/src/loss/WLS/WLS.jl @@ -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) @@ -171,8 +171,8 @@ function objective_gradient!(semwls::SemWLS, par, model::AbstractSemSingle, has_ gradient = -2*(σ₋'*V*∇σ + μ₋'*V_μ*∇μ)' return objective, gradient else - objective = dot(σ₋, V, σ₋) - gradient = -2*(σ₋'*V*∇σ)' + objective = dot(σ₋, V, σ₋) + gradient = -2*(σ₋'*V* ∇σ)' return objective, gradient end end