LAMPSPUC / UnobservedComponentsGAS

5 stars 0 forks source link

Example broken #10

Closed alexandrestreet closed 5 months ago

alexandrestreet commented 5 months ago

The example does not works:

dist = UnobservedComponentsGAS.tLocationScaleDistribution();

time_varying_params = [true, false, false]; d = 1.0; random_walk = Dict{Int64, Bool}(1 => true); random_walk_slope = Dict{Int64, Bool}(); ar = Dict{Int64, Any}(); seasonality = Dict{Int64,Int64}(1 => 24); sample_robustness = false; stochastic = false;

model = UnobservedComponentsGAS.GASModel(dist, time_varying_params, d, random_walk, random_walk_slope, ar, seasonality, robust,stochastic);

Error msg: ERROR: UndefVarError: robust not defined

Replacing robust with sample_robustness, which is defined. It does not work either. Error msg:

ERROR: MethodError: no method matching UnobservedComponentsGAS.GASModel(::UnobservedComponentsGAS.tLocationScaleDistribution, ::Vector{Bool}, ::Float64, ::Dict{Int64, Bool}, ::Dict{Int64, Bool}, ::Dict{Int64, Any}, ::Dict{Int64, Int64}, ::Bool, ::Bool)

Closest candidates are: UnobservedComponentsGAS.GASModel(::UnobservedComponentsGAS.ScoreDrivenDistribution, ::Vector{Bool}, ::Union{Missing, Float64, Int64}, ::Union{String, Vector{String}}, ::Union{String, Vector{String}}, ::Union{Missing, Int64, Vector{Missing}, Vector{Int64}, Vector{Union{Missing, Int64}}, Vector{Vector{Int64}}, Vector{Union{Missing, Vector{Int64}}}})

MathNog commented 5 months ago

Thank you for letting us know! We've just fixed that example in the documentation. Additionally, we've changed the model definition interface to make it simpler and more intuitive, and the new documentation example already reflects this change. We'll soon be adding more examples to explore and showcase all the features of the package.