Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust simulation window #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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 Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ScoreDrivenModels"
uuid = "4a87933e-d659-11e9-0e65-7f40dedd4a3a"
authors = ["guilhermebodin <[email protected]>, raphaelsaavedra <[email protected]>"]
version = "0.1.10"
version = "0.1.11"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
8 changes: 4 additions & 4 deletions src/simulate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ function simulate(series::Vector{T}, gas::Model{D, T}, H::Int, S::Int;
parameter_scenarios = Array{T, 3}(undef, H, n_params, S)
for scenario in 1:S
# Notice that we know the parameter time_varying parameters for T + 1
# So the last initial_params is already a part of the future simulation
# And we must take the
# So the last initial_params is already a part of the future simulation.
# When we simulate 60 steps ahead the last observation is one too much for us.
Copy link
Member

Choose a reason for hiding this comment

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

This comment isn't too clear to me, maybe elaborate a bit here? Why 60 steps? What does it mean one too much?

sim, param = simulate_recursion(gas, H + biggest_lag; initial_params = params_simulation)
observation_scenarios[:, scenario] = sim[biggest_lag+1:end]
observation_scenarios[:, scenario] = sim[biggest_lag:end-1]
# The first param is known
parameter_scenarios[:, :, scenario] = param[biggest_lag+1:end, :]
parameter_scenarios[:, :, scenario] = param[biggest_lag:end-1, :]
end
return observation_scenarios, parameter_scenarios
end
Expand Down