Skip to content

Commit

Permalink
blue format
Browse files Browse the repository at this point in the history
  • Loading branch information
andre_ramos committed Dec 3, 2024
1 parent 68c8782 commit 01f070c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/estimation_procedure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,4 @@ function estimation_procedure(
push!(ε_vec, ε_i)
end
return coefs_vec, ε_vec
end
end
34 changes: 17 additions & 17 deletions src/fit_forecast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -245,29 +245,29 @@ function simulate(
if is_univariate
if model.outlier
o_noises[i, :] = rand(
Normal(
0,
std(
model.output.components["o"]["Coefs"][(i + start_seasonal_term):seasonal_innovation_simulation:end],
Normal(
0,
std(
model.output.components["o"]["Coefs"][(i + start_seasonal_term):seasonal_innovation_simulation:end],
),
),
),
N_scenarios,
)
N_scenarios,
)
else
nothing
end
else
for j in eachindex(model.output)
if model.outlier
o_noises[j][i, :] = rand(
Normal(
0,
std(
model.output[j].components["o"]["Coefs"][(i + start_seasonal_term):seasonal_innovation_simulation:end],
Normal(
0,
std(
model.output[j].components["o"]["Coefs"][(i + start_seasonal_term):seasonal_innovation_simulation:end],
),
),
),
N_scenarios,
)
N_scenarios,
)
else
nothing
end
Expand All @@ -280,9 +280,9 @@ function simulate(
AbstractFloat.(hcat([prediction for _ in 1:N_scenarios]...))
else
[
AbstractFloat.(hcat([prediction[:, i] for _ in 1:N_scenarios]...)) for
i in eachindex(model.output)
]
AbstractFloat.(hcat([prediction[:, i] for _ in 1:N_scenarios]...)) for
i in eachindex(model.output)
]
end
if is_univariate
fill_simulation!(simulation, MV_dist_vec, o_noises, simulation_X)
Expand Down
2 changes: 1 addition & 1 deletion src/structs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ mutable struct Output
residuals_variances::Dict
valid_indexes::Vector{Int}
components::Dict
end
end
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,4 @@ function fill_simulation!(
simulation[j][:, s] += (simulation_X * sim_coefs + o_noises[j][:, s])
end
end
end
end

0 comments on commit 01f070c

Please sign in to comment.