From 79c8e9a77d1acceaa76d90480e788c7c99af0f5c Mon Sep 17 00:00:00 2001 From: thorek1 Date: Tue, 3 Oct 2023 23:25:51 +0200 Subject: [PATCH] clean up --- src/MacroModelling.jl | 9 +-------- src/get_functions.jl | 2 -- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/MacroModelling.jl b/src/MacroModelling.jl index a7b91554..f928e392 100644 --- a/src/MacroModelling.jl +++ b/src/MacroModelling.jl @@ -4309,7 +4309,6 @@ function calculate_covariance(parameters::Vector{<: Real}, 𝓂::ℳ; verbose::B covar_raw, _ = solve_matrix_equation_AD(values, coords = coordinates, dims = dimensions, solver = :doubling) - return covar_raw, sol , ∇₁, SS_and_pars end @@ -5010,7 +5009,6 @@ function calculate_third_order_moments(parameters::Vector{T}, values = vcat(v1, vec(collect(-C))) - # Σᶻ₃, info = solve_matrix_equation_forward(values, coords = coordinates, dims = dimensions, solver = :doubling) Σᶻ₃, info = solve_matrix_equation_AD(values, coords = coordinates, dims = dimensions, solver = :doubling) Σʸ₃tmp = ŝ_to_y₃ * Σᶻ₃ * ŝ_to_y₃' + ê_to_y₃ * Γ₃ * ê_to_y₃' + ê_to_y₃ * Eᴸᶻ * ŝ_to_y₃' + ŝ_to_y₃ * Eᴸᶻ' * ê_to_y₃' @@ -5123,13 +5121,8 @@ function calculate_kalman_filter_loglikelihood(𝓂::ℳ, data::AbstractArray{Fl values = vcat(vec(A), vec(collect(-𝐁))) P, _ = solve_matrix_equation_AD(values, coords = coordinates, dims = dimensions, solver = :doubling) - # P, _ = solve_matrix_equation_forward(values, coords = coordinates, dims = dimensions, solver = :doubling) - # P, _ = solve_matrix_equation_AD_direct(values, coords = coordinates, dims = dimensions, solver = :doubling) - # P, _ = solve_matrix_equation_AD_direct([vec(A); vec(-𝐁)], dims = [size(A), size(𝐁)], solver = :bicgstab) - # P, _ = solve_matrix_equation_forward([vec(A); vec(-CC)], dims = [size(A), size(CC)]) - # P, _ = calculate_covariance_AD(sol, T = 𝓂.timings, subset_indices = Int64[observables_and_states...]) - # P = reshape((ℒ.I - ℒ.kron(A, A)) \ reshape(𝐁, prod(size(A)), 1), size(A)) + u = zeros(length(observables_and_states)) # u = SS_and_pars[sort(union(𝓂.timings.past_not_future_and_mixed,observables))] |> collect z = C * u diff --git a/src/get_functions.jl b/src/get_functions.jl index d41c5a8d..f4028258 100644 --- a/src/get_functions.jl +++ b/src/get_functions.jl @@ -1690,8 +1690,6 @@ function get_variance_decomposition(𝓂::ℳ; values = vcat(vec(A), vec(collect(-CC))) covar_raw, _ = solve_matrix_equation_AD(values, coords = coordinates, dims = dimensions, solver = :doubling) - # covar_raw, _ = solve_matrix_equation_AD_direct([vec(A); vec(-CC)], dims = [size(A), size(CC)], solver = :bicgstab) - # covar_raw, _ = solve_matrix_equation_forward([vec(A); vec(-CC)], dims = [size(A), size(CC)]) variances_by_shock[:,i] = ℒ.diag(covar_raw) end