-
Notifications
You must be signed in to change notification settings - Fork 25
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
Linear univariate time variant model implemented? #321
Comments
Do you have a Minimal working example? A script with some fake data that breaks in the same way. |
Hi Guilherme, Yes, the following code fragment is self-contained:
That produces the same error. Also, would estimation of time-invariant Q_t be possible? Thank you so much! |
Hi @jsimons8, the issue is that you're not parametrizing
Maybe we should set |
Hi @raphaelsaavedra thank you so much! That indeed solves the issue. Now, is it possible to somehow instruct the package to estimate |
Oh and somehow the command I am not sure how to proceed. The type |
Not too sure on the question about estimating Qt from a system – maybe @guilhermebodin will know. Admittedly it's been a while since I've properly maintained the package. On the reason why you're getting that MethodError, it's because ERROR: MethodError: no method matching fit!(::LinearUnivariateTimeVariant{Float64})
Closest candidates are:
fit!(::StateSpaceModel; filter, optimizer, save_hyperparameter_distribution) at ~/.julia/packages/StateSpaceModels/DmxMT/src/fit.jl:29
fit!(::Naive) at ~/.julia/packages/StateSpaceModels/DmxMT/src/models/naive_models.jl:46
fit!(::SeasonalNaive) at ~/.julia/packages/StateSpaceModels/DmxMT/src/models/naive_models.jl:114
... There are two main ways you can proceed IMO. One is see if what you're trying to do falls under any existing model in the package. If not, you can implement a new model type (define it as a subtype of |
Great, so you mean writing something like
Do you have any resources on how to work on a modification of the package? |
You can implemented them oustide of the package in your own code or create a new model in the models folder. To be able to fit you have to declare a new model, just like local level and implement some methods. The fit function will check it for you if every method is implemented. """
has_fit_methods(model_type::Type{<:StateSpaceModel}) -> Bool
Verify if a certain `StateSpaceModel` has the necessary methods to perform `fit!``.
"""
function has_fit_methods(model_type::Type{<:StateSpaceModel})
tuple_with_model_type = Tuple{model_type}
m1 = hasmethod(default_filter, tuple_with_model_type)
m2 = hasmethod(initial_hyperparameters!, tuple_with_model_type)
m3 = hasmethod(constrain_hyperparameters!, tuple_with_model_type)
m4 = hasmethod(unconstrain_hyperparameters!, tuple_with_model_type)
m5 = hasmethod(fill_model_system!, tuple_with_model_type)
return m1 && m2 && m3 && m4 && m5
end |
I was wondering if the method LinearUnivariateTimeVariant was already implemented?
The call
where
tv_observational_noise
is aVector{Float64}
with the same (15) number of elements. This call yielded the following error:MethodError: no method matching LinearUnivariateTimeVariant(::Vector{Float64}, ::Vector{Vector{Float64}}, ::Vector{Matrix{Float64}}, ::Vector{Matrix{Float64}}, ::Vector{Float64}, ::Vector{Vector{Float64}}, ::Vector{Float64}, ::Vector{Matrix{Float64}})
Given, I have observed all types, I am wondering if this is because the method is not implemented?
If it is implemented, do you think you can help me fix the call? Moreover, I was hoping to estimate the time-independent Q_t hyperparameter but the method definition seems to ask for a Q_t without the possibility of its estimation.
The text was updated successfully, but these errors were encountered: