Code Monkey home page Code Monkey logo

Comments (4)

petroniocandido avatar petroniocandido commented on June 6, 2024

I am analyzing your code yet but, a priori, you make some conceptual mistakes.

You can't use the "forecast_ahead" function to perform one step ahead forecasting, the correct way to do this is using the "forecast" function. The "forecast_ahead" function has some assumptions that "forecast" function does not have (for example, it will consider just the last data lags as input and ignore the first ones) and these specificities are treated on "predict" function.

In general the functions "forecast" and "forecast_ahead" are made just for internal method use, and the end user must always call the "predict" function and let it chose the best internal function to call given the informed parameters. The same idea can be applied to the "train" (just for internal use) and "fit" (interface for end users) functions.

I think now that this information not well, neither explicitly, explained on documentation and tutorials and I must fix this to avoid this kind of mistake.

This information helped you to understand better the use of pyFTS models?

from pyfts.

 avatar commented on June 6, 2024

Yes Thank you if you need any help writing documentation i would be glad to help :)

P.S model.predict(data,steps_ahead=1)
returns all predictions, while model.predict(data,steps_ahead=2) returns 2 predictions
is this on purpose?

from pyfts.

petroniocandido avatar petroniocandido commented on June 6, 2024

Yes, it is! You don't need to specify steps_ahead=1, this is the default behavior. In this case, for each data point in the input list (or array) will be generated a one step ahead forecast (using the number of past lags specified on model's order). A input list will generate a output list (one data point for each group of lags). But for many steps ahead it will always take the last n lags (order=n) and forecast the next m data points (steps_ahead=m).

Suppose a model with order=1, a input sample with 10 data points and you want to forecast two steps ahead (steps_ahead=2). It will be tricky if for each data point the model generate two data points, so it will have a list of lists and this may be a little messy and also a little be unusual. So the default behavior of pyFTS is to take the last lags and forecast ahead.

from pyfts.

 avatar commented on June 6, 2024

Awesome :) thanks again

from pyfts.

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.