GithubHelp home page GithubHelp logo

Comments (4)

helske avatar helske commented on August 19, 2024

Hard to say based on what you write, how many data points do you have and how long is the state vector? Is your model gaussian or non-gaussian?

from kfas.

suprajamalladi avatar suprajamalladi commented on August 19, 2024

sorry I didn't give you the details earlier. The dataset has 1800 points. the model is gaussian and the model has 4 parameters: level, trend, seasonal, variance (H). Below is my model:

model <-SSModel(data.1~SSMtrend(2,Q=list(NA,NA))+
SSMseasonal(period=251,sea.type='dummy',Q=NA),data=data.1,H=NA)

ownupdatefn <- function(pars,model,...){
model$H[] <- exp(pars[1])
diag(model$Q[,,1])[1:3]<- exp(c(pars[2],pars[3],pars[4]))
model }

kfasfit <-fitSSM(inits=rep(log(var(data.1)),4), model=model, updatefn=ownupdatefn,method='BFGS')

from kfas.

helske avatar helske commented on August 19, 2024

Ok, the issue is in your seasonal component, you have 250+ states which will slow down the recursions. You could try this kind of approach: https://robjhyndman.com/hyndsight/longseasonality/ (you can find the fourier function from the forecast package). Another option would be to use cyclic component (``SSMcycle`), but that is of course theoretically bit different thing than the seasonal component.

from kfas.

suprajamalladi avatar suprajamalladi commented on August 19, 2024

thank you for your response! I will try out your suggestions and check.

from kfas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.