Edition
Building Temporal AI: From Forecasting to Sequential Decision Making, Second Edition (2026). The edition line appears in the footer of every page of the book; if the footer on the page you are reading names a different edition, you are reading a later revision of this work.
Copyright Notice
Copyright © 2026 Alexander Apartsin & Yehudit Aperstein. All rights reserved. This book is independently published.
No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the copyright holders, except for brief quotations embodied in reviews, scholarly commentary, classroom teaching, and other noncommercial uses permitted as fair use under applicable copyright law. Instructors are welcome to reference the book and assign it in their courses.
Use of Code Examples
The code examples in this book exist to be used. You may run, modify, and incorporate them into your own programs and projects, commercial or otherwise, without seeking permission, and attribution is appreciated but not required for ordinary use. The examples are provided for educational purposes. Reproducing a significant portion of the book's code or prose in another publication, in teaching materials offered for sale, or in a product whose value derives substantially from this book's content does require written permission from the copyright holders.
Trademarks
Product and library names mentioned in this book, including Python, NumPy, pandas, statsmodels, sktime, Prophet, Nixtla, GluonTS, Darts, PyTorch, PyTorch Forecasting, Lightning, Hugging Face, Gymnasium, Stable-Baselines3, and others, are trademarks or registered trademarks of their respective owners. They are used in this book for identification and explanation only, without intent of infringement, and their appearance does not imply any affiliation with or endorsement by the trademark holders.
Disclaimer of Warranty
This book is provided on an "as is" basis, without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement. The code examples are intended for educational use. While the authors and the production pipeline have taken care to ensure accuracy, the field this book describes moves quickly: libraries change their interfaces, models are superseded, benchmark numbers shift, and links age. Neither the authors nor any distributor of this book shall be liable for any loss or damage arising from the use of the information or code contained herein. Verify behavior in your own environment before relying on it in production systems, and do not rely on any forecast or decision policy from this book for financial, clinical, or safety-critical use without independent validation.
Production Disclosure
This book was produced by Alexander Apartsin and Yehudit Aperstein together with a staged pipeline of AI writing agents operating under their direction, as described in About the Authors. Editorial responsibility for the content rests with the human authors. A book reviewed this many times is still not immune to error; where mistakes remain, they are folded into later revisions as they are found.
Third-Party Links and Datasets
The book links to external papers, repositories, documentation, and datasets. These resources are the property of their respective owners and are governed by their own licenses, which you should review before use; dataset licensing notes in the appendices are summaries, not legal advice. External URLs were verified during production but may move or change after publication.
Permissions and Contact
For permission requests beyond the scope described above, including translation, redistribution, excerpting, and adaptation, and for corrections, contact the copyright holders through their homepages: Alexander Apartsin at apartsin.com and Yehudit Aperstein at her Afeka faculty page.