Code Monkey home page Code Monkey logo

Comments (10)

philipperemy avatar philipperemy commented on September 27, 2024 1

Fixed in fb1f612

from n-beats.

fecet avatar fecet commented on September 27, 2024

[UPDATE] I find the origin paper mentioned that the stop gradient in denominator, but I dont see this trick in his code and that may result in relative bad performance. I will keep investigating it.

from n-beats.

fecet avatar fecet commented on September 27, 2024

The linear space function should use an adapted horizon,

def linear_space(backcast_length, forecast_length, is_forecast=True):
    # ls = K.arange(-float(backcast_length), float(forecast_length), 1) / forecast_length
    # return ls[backcast_length:] if is_forecast else K.abs(K.reverse(ls[:backcast_length], axes=0))
    horizon = forecast_length if is_forecast else backcast_length
    return K.arange(0,horizon)/horizon

from n-beats.

philipperemy avatar philipperemy commented on September 27, 2024

@fecet thank you very much!! Can you detail a bit more what you found? Is it just changing the linear_space and it works?

from n-beats.

philipperemy avatar philipperemy commented on September 27, 2024

And yes please post the full code it's very interesting!

from n-beats.

fecet avatar fecet commented on September 27, 2024

@fecet thank you very much!! Can you detail a bit more what you found? Is it just changing the linear_space and it works?

Yes, in former code, the denominator is always forecast_length, when backcast_lenghth is large, like 7*forecast_length the value in linear_space will reach up to 7, result in output explode in trend block since it will be multiplied by 7*p several times. And smape_loss's own property make it become 200 as y_pred dominate.

Thanks for your interest, I will create a repository for my reimplement later. BTW, I found this behaviour by your keract tool!

from n-beats.

philipperemy avatar philipperemy commented on September 27, 2024

@fecet Very happy to hear that!! Please post your results and code. Thank you for using keract. I'm happy it helps ;)

from n-beats.

fecet avatar fecet commented on September 27, 2024

Here is my repo, any comments would be highly appreciated.

from n-beats.

philipperemy avatar philipperemy commented on September 27, 2024

thank you so much I'm going to have a look shortly

from n-beats.

philipperemy avatar philipperemy commented on September 27, 2024

I added a link to your repo in the README btw

from n-beats.

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.