Skip to content
Merged
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 = "StateSpaceLearning"
uuid = "971c4b7c-2c4e-4bac-8525-e842df3cde7b"
authors = ["andreramosfc <[email protected]>"]
version = "1.3.1"
version = "1.3.2"

[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ y = solars[!, "values"]
T = length(y)
steps_ahead = 168

model = StructuralModel(y; freq_seasonal=24)
model = StructuralModel(y; freq_seasonal=168)
fit!(model)
prediction = StateSpaceLearning.forecast(model, steps_ahead) # arguments are the output of the fitted model and number of steps ahead the user wants to forecast

Expand Down
8 changes: 6 additions & 2 deletions src/estimation_procedure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ function estimation_procedure(

if hasintercept
penalty_factor = ones(size(Estimation_X, 2) - 1)
penalty_factor[components_indexes["initial_states"][2:end] .- 1] .= 0
if length(penalty_factor) != length(components_indexes["initial_states"][2:end])
penalty_factor[components_indexes["initial_states"][2:end] .- 1] .= 0
end
coefs, _ = fit_lasso(
Estimation_X,
estimation_y,
Expand All @@ -307,7 +309,9 @@ function estimation_procedure(
)
else
penalty_factor = ones(size(Estimation_X, 2))
penalty_factor[components_indexes["initial_states"][1:end]] .= 0
if length(penalty_factor) != length(components_indexes["initial_states"])
penalty_factor[components_indexes["initial_states"][1:end]] .= 0
end
coefs, _ = fit_lasso(
Estimation_X,
estimation_y,
Expand Down
Loading