Skip to content

Commit d87370f

Browse files
committed
fix _
1 parent 7f7bcb5 commit d87370f

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

docs/src/adapting_package.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The StateSpaceLearning framework supports any additive state space formulation.
44

55
## Local Level Model
66

7-
Although the Local Level Model is already implemented within the scope of unobserved components, we use it here as an example. To incorporate a new model, it is necessary to create a dictionary containing the model inputs and another dictionary containing three functions (create_X, get_components_indexes, and get_variances).
7+
Although the Local Level Model is already implemented within the scope of unobserved components, we use it here as an example. To incorporate a new model, it is necessary to create a dictionary containing the model inputs and another dictionary containing three functions (create\_X, get\_components\_indexes, and get\_variances).
88

99
### Model Inputs
1010
For the Local Level Model, no parameters are needed. Thus, the model input can be created as:
@@ -13,8 +13,8 @@ For the Local Level Model, no parameters are needed. Thus, the model input can b
1313
model_input = Dict()
1414
```
1515

16-
### create_X
17-
The create_X function constructs the matrices in the State Space Learning format. It must accept the following inputs: (model_input::Dict, Exogenous_X::Matrix{Fl}, steps_ahead::Int64=0, Exogenous_Forecast::Matrix{Fl}). It must return a matrix.
16+
### create\_X
17+
The create\_X function constructs the matrices in the State Space Learning format. It must accept the following inputs: (model\_input::Dict, Exogenous\_X::Matrix{Fl}, steps\_ahead::Int64=0, Exogenous\_Forecast::Matrix{Fl}). It must return a matrix.
1818

1919
```julia
2020
function create_X_LocalLevel(model_input::Dict, Exogenous_X::Matrix{Fl},
@@ -30,8 +30,8 @@ function create_X_LocalLevel(model_input::Dict, Exogenous_X::Matrix{Fl},
3030
end
3131
```
3232

33-
### get_components_indexes
34-
The get_components_indexes function outputs a dictionary indicating the indexes of each model component, including a set of indexes for all initial states. For the Local Level Model, the only components are the initial state μ1 and its innovations ξ. The function must accept the following inputs: (Exogenous_X::Matrix{Fl}, model_input::Dict). It must return a dictionary.
33+
### get\_components\_indexes
34+
The get\_components\_indexes function outputs a dictionary indicating the indexes of each model component, including a set of indexes for all initial states. For the Local Level Model, the only components are the initial state μ1 and its innovations ξ. The function must accept the following inputs: (Exogenous\_X::Matrix{Fl}, model\_input::Dict). It must return a dictionary.
3535

3636
```julia
3737
function get_components_indexes_LocalLevel(Exogenous_X::Matrix{Fl}, model_input::Dict)::Dict where Fl
@@ -42,8 +42,8 @@ function get_components_indexes_LocalLevel(Exogenous_X::Matrix{Fl}, model_input:
4242
return Dict("μ1" => μ1_indexes, "ξ" => ξ_indexes, "initial_states" => initial_states_indexes)
4343
end
4444
```
45-
### get_variances
46-
The get_variances function calculates the variances of the innovations and residuals. It must accept the following inputs:(ε::Vector{Fl}, coefs::Vector{Fl}, components_indexes::Dict{String, Vector{Int64}}). It must return a dictionary.
45+
### get\_variances
46+
The get\_variances function calculates the variances of the innovations and residuals. It must accept the following inputs:(ε::Vector{Fl}, coefs::Vector{Fl}, components\_indexes::Dict{String, Vector{Int64}}). It must return a dictionary.
4747

4848
```julia
4949
function get_variances_LocalLevel::Vector{Fl}, coefs::Vector{Fl}, components_indexes::Dict{String, Vector{Int64}})::Dict where Fl
@@ -56,7 +56,7 @@ end
5656
```
5757

5858
### Running the new model
59-
To test the new model, run the fit_model function with the new inputs:
59+
To test the new model, run the fit\_model function with the new inputs:
6060

6161
```julia
6262
using StateSpaceLearning
@@ -70,7 +70,7 @@ output = StateSpaceLearning.fit_model(y; model_input = model_input, model_functi
7070
```
7171

7272
# Changing Estimation Procedure
73-
The current estimation procedure is based on an Adaptive Lasso. However, alternative methods can be chosen within the StateSpaceLearning framework. Below is an example of how to implement a simple model that minimizes the sum of squares of the residuals. This requires creating two variables: a dictionary estimation_input (which is empty in this case) and a function estimation_function with the following arguments:(Estimation_X::Matrix{Tl}, estimation_y::Vector{Fl}, components_indexes::Dict{String, Vector{Int64}}, estimation_input::Dict). The function should return a tuple containing the model coefficients and residuals.
73+
The current estimation procedure is based on an Adaptive Lasso. However, alternative methods can be chosen within the StateSpaceLearning framework. Below is an example of how to implement a simple model that minimizes the sum of squares of the residuals. This requires creating two variables: a dictionary estimation\_input (which is empty in this case) and a function estimation\_function with the following arguments:(Estimation_X::Matrix{Tl}, estimation\_y::Vector{Fl}, components\_indexes::Dict{String, Vector{Int64}}, estimation\_input::Dict). The function should return a tuple containing the model coefficients and residuals.
7474

7575
```julia
7676
estimation_input = Dict()

docs/src/manual.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ plot(trend, w=2 , color = "Black", lab = "Trend Component", legend = :outerbotto
104104
plot(seasonal, w=2 , color = "Black", lab = "Seasonal Component", legend = :outerbottom)
105105

106106
```
107-
108-
| ![quick_example_trend](assets/trend.svg) | ![quick_example_seas](assets/seasonal.svg)|
109-
|:------------------------------:|:-----------------------------:|
110-
107+
![quick_example_trend](assets/trend.svg)
108+
![quick_example_seas](assets/seasonal.svg)
111109

112110
### Best Subset Selection
113111
Quick example on how to perform best subset selection in time series utilizing StateSpaceLearning.
@@ -221,9 +219,9 @@ julia paper_tests/m4_test/m4_test.jl
221219
python paper_tests/m4_test/m4_test.py
222220
```
223221

224-
The results for SSL model in terms of MASE and sMAPE for all 48000 series will be stored in folder "paper_tests/m4_test/results_SSL". The average results of MASE, sMAPE and OWA will be saved in file "paper_tests/m4_test/metric_results/SSL_METRICS_RESULTS.csv".
222+
The results for SSL model in terms of MASE and sMAPE for all 48000 series will be stored in folder "paper\_tests/m4\_test/results\_SSL". The average results of MASE, sMAPE and OWA will be saved in file "paper\_tests/m4\_test/metric\_results/SSL\_METRICS\_RESULTS.csv".
225223

226-
The results for SS model in terms of MASE and sMAPE for all 48000 series will be stored in folder "paper_tests/m4_test/results_SS". The average results of MASE, sMAPE and OWA will be saved in file "paper_tests/m4_test/metric_results/SS_METRICS_RESULTS.csv".
224+
The results for SS model in terms of MASE and sMAPE for all 48000 series will be stored in folder "paper\_tests/m4\_test/results\_SS". The average results of MASE, sMAPE and OWA will be saved in file "paper\_tests/m4\_test/metric\_results/SS\_METRICS\_RESULTS.csv".
227225

228226
### Simulation Experiment
229227

@@ -239,7 +237,7 @@ As this test takes a long time, you may want to run it in parallel, for that you
239237
julia paper_tests/simulation_test/simulation.jl 3
240238
```
241239

242-
The results will be saved in two separated files: "paper_tests/simulation_test/results_metrics/metrics_confusion_matrix.csv" and "paper_tests/simulation_test/results_metrics/metrics_bias_mse.csv"
240+
The results will be saved in two separated files: "paper\_tests/simulation\_test/results\_metrics/metrics\_confusion\_matrix.csv" and "paper\_tests/simulation\_test/results\_metrics/metrics\_bias\_mse.csv"
243241

244242

245243
## Contributing

0 commit comments

Comments
 (0)