Predicting the hailstone sequence using a Temporal Fusion Transformer (Pytorch)

Predicting the hailstone sequence using a Temporal Fusion Transformer (Pytorch)

The hailstone sequence is one of those beautiful mathematical mysteries which can be defined very easily:

  • Start with any natural number greater than 1.
  • If it is even, divide it by 2
  • If it is is odd, multiply it by 3 and add 1
  • Continue until it you reach 1

Here we are using Pytorch Forecasting:

to predict the last numbers in the sequence, using a Temporal Fusion Transformer. In general it is possible to have good results, however sometimes as usual the prediction is not so good, as in this case

No alt text provided for this image

You can see the Jupyter notebook here: https://github.com/multiopti/MYWAI/blob/main/hailstoneTFT.ipynb

Feel free to leave your comments here below, I would be happy to answer.

At?MYWAI?we promote agile, explainable, reliable and affordable ML at the edge.

要查看或添加评论,请登录

Gustavo Sánchez Hurtado的更多文章

社区洞察

其他会员也浏览了