Coder Social home page Coder Social logo

Comments (9)

config-i1 avatar config-i1 commented on July 29, 2024

Don't rewrite the existing function, but see if an alternative can be developed based on that.

from mes.

config-i1 avatar config-i1 commented on July 29, 2024

This involves a different state space structure: the function should look at the index of current observation and use the same index from the past in order to get the previous state. This will allow dealing with non-constant seasonalities.

from mes.

config-i1 avatar config-i1 commented on July 29, 2024

This is relevant to m=24 because of the daylight saving and m=365 because of the leap years.
The question is how to detect the change of indices in the data. Take from the y (e.g. zoo or POSIXct)? Or accept in lags somehow?

Potentially, this means that internally, instead of the vector of lags, we need to have a matrix, something like:

1 1 24
1 1 24
1 1 23
1 1 23
...
1 1 24

from mes.

config-i1 avatar config-i1 commented on July 29, 2024

What to do:

  1. Move the lagrows from C++ code to R,
  2. Make lagrows a matrix with lags, update C++ to deal with matrix,
  3. Amend the lagrows in the R code in order to reflect the changes in m for DST / Leap years.

from mes.

config-i1 avatar config-i1 commented on July 29, 2024

Is it possible not to have a matrix for lagrows? Maybe have two variables: vector of lags and the matrix of lags. If the latter is not provided, then use the first one? This way we will save some space for cases, when the matrix is not needed.

from mes.

config-i1 avatar config-i1 commented on July 29, 2024

Work in progress. Things to do:

  1. Introduce lagsCorrected matrix in the adamFitter and adam();
  2. Use the matrix in the adamForecaster() in C++
  3. Introduce it in adamSimulator() in C++
  4. Introduce lagsCorrected matrix in the forecast() method;
  5. The same stuff in adamErrorer(), CF() and rmultistep();

from mes.

config-i1 avatar config-i1 commented on July 29, 2024

An alternative approach - abandon lags and use the seasonal profiles:

  1. Create a matrix with indices (e.g. when Monday happens in the data or when 22.00 is located);
  2. Use references to previous indices instead of lags;

In order to do this, the following things need to be updated in the code:

  1. adamFitter in C++;
  2. adamForecaster in C++;
  3. adamErrorer in C++;
  4. adamSimulator in C++;
  5. adamGeneral file with the checks;
  6. adam(), in the initialisation part.

from mes.

config-i1 avatar config-i1 commented on July 29, 2024
  1. Recent and observed profiles are now introduced in a separate branch.
  2. adamFitter is done.

Things to add / change:

  1. Use recentProfileTable instead of matVt, when producing forecasts;
  2. Change obsStates to just obsInSample + maxLag, trim matVt for backcasting, as this is no longer needed;
  3. Do the other elements from the previous comment.

from mes.

config-i1 avatar config-i1 commented on July 29, 2024

All done for the basic time series without the time stamps.

from mes.

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.