{
  "source_file": "0930",
  "source_platform": "Medium",
  "author": "Marco Peixeiro",
  "title_listed": "TimeGPT vs TiDE: Is Zero-Shot Inference the Future of Forecasting or Just Hype?",
  "keywords": "",
  "domain": "机器学习",
  "content_type": "深度技术解析",
  "is_paid_flag": "否",
  "url": "https://towardsdatascience.com/timegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76/",
  "publish_date": "2024-01-01",
  "corpus_stage": "",
  "notes": "",
  "id": "650517ad2b7b",
  "collected_at": "2026-10-02T08:51:45",
  "title": "TimeGPT vs TiDE: Is Zero-Shot Inference the Future of Forecasting or Just Hype? | Towards Data Science",
  "body_markdown": "![Revisit consent button](../images/body-df29beacd7496220cc94.svg)\nWe value your privacy\nWe use cookies to enhance your browsing experience, serve personalised ads or content, and analyse our traffic. By clicking \"Accept All\", you consent to our use of cookies.\nCustomise Reject All Accept All\nCustomise Consent Preferences ![](../images/body-2159bb67f3de8ad870eb.svg)\nWe use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.\nThe cookies that are categorised as \"Necessary\" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... Show more\nNecessaryAlways Active\nNecessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.\n  * Cookie\nBCTempID\n  * Duration\n10 minutes\n  * Description\nNo description available.\n\n\n  * Cookie\n__cf_bm\n  * Duration\n1 hour\n  * Description\nThis cookie, set by Cloudflare, is used to support Cloudflare Bot Management. \n\n\n  * Cookie\nAWSALBCORS\n  * Duration\n7 days\n  * Description\nAmazon Web Services set this cookie for load balancing.\n\n\n  * Cookie\n_cfuvid\n  * Duration\nsession\n  * Description\nCloudflare sets this cookie to track users across sessions to optimize user experience by maintaining session consistency and providing personalized services\n\n\n  * Cookie\nli_gc\n  * Duration\n6 months\n  * Description\nLinkedin set this cookie for storing visitor's consent regarding using cookies for non-essential purposes.\n\n\n  * Cookie\n__hssrc\n  * Duration\nsession\n  * Description\nThis cookie is set by Hubspot whenever it changes the session cookie. The __hssrc cookie set to 1 indicates that the user has restarted the browser, and if the cookie does not exist, it is assumed to be a new session.\n\n\n  * Cookie\n__hssc\n  * Duration\n1 hour\n  * Description\nHubSpot sets this cookie to keep track of sessions and to determine if HubSpot should increment the session number and timestamps in the __hstc cookie.\n\n\n  * Cookie\nwpEmojiSettingsSupports\n  * Duration\nsession\n  * Description\nWordPress sets this cookie when a user interacts with emojis on a WordPress site. It helps determine if the user's browser can display emojis properly.\n\n\n  * Cookie\nBCSessionID\n  * Duration\n1 year 1 month 4 days\n  * Description\nBlueconic sets this cookie as a unique identifier for the BlueConic profile.\n\n\n  * Cookie\n_octo\n  * Duration\n1 year\n  * Description\nNo description available.\n\n\n  * Cookie\nlogged_in\n  * Duration\n1 year\n  * Description\nNo description available.\n\n\n  * Cookie\n__Secure-YEC\n  * Duration\npast\n  * Description\nYouTube sets this cookie to stores the user's video player preferences using embedded YouTube video\n\n\n  * Cookie\n__eoi\n  * Duration\n6 months\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nAWSALBTGCORS\n  * Duration\n7 days\n  * Description\nNo description available.\n\n\n  * Cookie\nlogin-status-p\n  * Duration\npast\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nAWSALBTG\n  * Duration\n7 days\n  * Description\nNo description available.\n\n\n  * Cookie\ncsrf_token\n  * Duration\nsession\n  * Description\nNo description available.\n\n\n  * Cookie\ntoken_v2\n  * Duration\n1 day\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nD\n  * Duration\n1 year\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nPHPSESSID\n  * Duration\nsession\n  * Description\nThis cookie is native to PHP applications. The cookie stores and identifies a user's unique session ID to manage user sessions on the website. The cookie is a session cookie and will be deleted when all the browser windows are closed.\n\n\n  * Cookie\nVISITOR_PRIVACY_METADATA\n  * Duration\n6 months\n  * Description\nYouTube sets this cookie to store the user's cookie consent state for the current domain. \n\n\n  * Cookie\ncookietest\n  * Duration\nsession\n  * Description\nThe cookietest cookie is typically used to determine whether the user's browser accepts cookies, essential for website functionality and user experience.\n\n\n  * Cookie\n__Host-airtable-session\n  * Duration\n1 year\n  * Description\nThis cookie is used to enable us to integrate the services of Airtable.\n\n\n  * Cookie\n__Host-airtable-session.sig\n  * Duration\n1 year\n  * Description\nThis cookie is used to enable us to integrate the services of Airtable.\n\n\n  * Cookie\nm\n  * Duration\n1 year 1 month 4 days\n  * Description\nStripe sets this cookie for fraud prevention purposes. It identifies the device used to access the website, allowing the website to be formatted accordingly.\n\n\n  * Cookie\nBIGipServer*\n  * Duration\nsession\n  * Description\nMarketo sets this cookie to collect information about the user's online activity and build a profile about their interests to provide advertisements relevant to the user. \n\n\n  * Cookie\n__cfruid\n  * Duration\nsession\n  * Description\nCloudflare sets this cookie to identify trusted web traffic.\n\n\n  * Cookie\n_GRECAPTCHA\n  * Duration\n6 months\n  * Description\nGoogle Recaptcha service sets this cookie to identify bots to protect the website against malicious spam attacks.\n\n\n  * Cookie\n__Secure-YNID\n  * Duration\n6 months\n  * Description\nGoogle cookie used to protect user security and prevent fraud, especially during the login process.\n\n\n  * Cookie\ncookieyes-consent\n  * Duration\n1 year\n  * Description\nCookieYes sets this cookie to remember users' consent preferences so that their preferences are respected on subsequent visits to this site. It does not collect or store any personal information about the site visitors.\n\n\nFunctional\nFunctional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.\n  * Cookie\nlidc\n  * Duration\n1 day\n  * Description\nLinkedIn sets the lidc cookie to facilitate data center selection.\n\n\n  * Cookie\nbrw\n  * Duration\n1 year\n  * Description\nNo description available.\n\n\n  * Cookie\nbrwConsent\n  * Duration\n5 minutes\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nWMF-Uniq\n  * Duration\n1 year\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nloom_anon_comment\n  * Duration\n1 year\n  * Description\nNo description available.\n\n\n  * Cookie\nloom_referral_video\n  * Duration\nsession\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nVISITOR_INFO1_LIVE\n  * Duration\n6 months\n  * Description\nA cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.\n\n\n  * Cookie\nyt-remote-connected-devices\n  * Duration\nNever Expires\n  * Description\nYouTube sets this cookie to store the user's video preferences using embedded YouTube videos.\n\n\n  * Cookie\nytidb::LAST_RESULT_ENTRY_KEY\n  * Duration\nNever Expires\n  * Description\nThe cookie ytidb::LAST_RESULT_ENTRY_KEY is used by YouTube to store the last search result entry that was clicked by the user. This information is used to improve the user experience by providing more relevant search results in the future.\n\n\n  * Cookie\nyt-remote-device-id\n  * Duration\nNever Expires\n  * Description\nYouTube sets this cookie to store the user's video preferences using embedded YouTube videos.\n\n\n  * Cookie\nyt-remote-session-name\n  * Duration\nsession\n  * Description\nThe yt-remote-session-name cookie is used by YouTube to store the user's video player preferences using embedded YouTube video.\n\n\n  * Cookie\nyt-remote-fast-check-period\n  * Duration\nsession\n  * Description\nThe yt-remote-fast-check-period cookie is used by YouTube to store the user's video player preferences for embedded YouTube videos.\n\n\n  * Cookie\nyt-remote-session-app\n  * Duration\nsession\n  * Description\nThe yt-remote-session-app cookie is used by YouTube to store user preferences and information about the interface of the embedded YouTube video player.\n\n\n  * Cookie\nyt-remote-cast-available\n  * Duration\nsession\n  * Description\nThe yt-remote-cast-available cookie is used to store the user's preferences regarding whether casting is available on their YouTube video player.\n\n\n  * Cookie\nyt-remote-cast-installed\n  * Duration\nsession\n  * Description\nThe yt-remote-cast-installed cookie is used to store the user's video player preferences using embedded YouTube video.\n\n\n  * Cookie\ncp_session\n  * Duration\n3 months\n  * Description\nCodepen sets this cookie for Help systems found in the website.\n\n\n  * Cookie\nloid\n  * Duration\n1 year 1 month 4 days\n  * Description\nThis cookie is set by the Reddit. The cookie enables the sharing of content from the website onto the social media platform.\n\n\nAnalytics\nAnalytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.\n  * Cookie\n__hstc\n  * Duration\n6 months\n  * Description\nHubspot set this main cookie for tracking visitors. It contains the domain, initial timestamp (first visit), last timestamp (last visit), current timestamp (this visit), and session number (increments for each subsequent session).\n\n\n  * Cookie\nhubspotutk\n  * Duration\n6 months\n  * Description\nHubSpot sets this cookie to keep track of the visitors to the website. This cookie is passed to HubSpot on form submission and used when deduplicating contacts.\n\n\n  * Cookie\n_ga\n  * Duration\n1 year 1 month 4 days\n  * Description\nGoogle Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors.\n\n\n  * Cookie\n_ga_*\n  * Duration\n1 year 1 month 4 days\n  * Description\nGoogle Analytics sets this cookie to store and count page views.\n\n\n  * Cookie\n__Host-psifi.analyticsTrace\n  * Duration\n6 hours\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\n__Host-psifi.analyticsTraceV2\n  * Duration\n6 hours\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\n_gh_sess\n  * Duration\nsession\n  * Description\nGitHub sets this cookie for temporary application and framework state between pages like what step the user is on in a multiple step form.\n\n\n  * Cookie\nYSC\n  * Duration\nsession\n  * Description\nYSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.\n\n\n  * Cookie\najs_anonymous_id\n  * Duration\n1 year\n  * Description\nThis cookie is set by Segment to count the number of people who visit a certain site by tracking if they have visited before.\n\n\n  * Cookie\nvuid\n  * Duration\n1 year 1 month 4 days\n  * Description\nVimeo installs this cookie to collect tracking information by setting a unique ID to embed videos on the website. \n\n\nPerformance\nPerformance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.\n  * Cookie\nAWSALB\n  * Duration\n7 days\n  * Description\nAWSALB is an application load balancer cookie set by Amazon Web Services to map the session to the target.\n\n\n  * Cookie\nacq\n  * Duration\npast\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nacq.sig\n  * Duration\npast\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nptc\n  * Duration\n2 years\n  * Description\nNo description available.\n\n\nAdvertisement\nAdvertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.\n  * Cookie\nmuc_ads\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to collect user behaviour and interaction data to optimize the website.\n\n\n  * Cookie\nguest_id_marketing\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to identify and track the website visitor.\n\n\n  * Cookie\nguest_id_ads\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to identify and track the website visitor.\n\n\n  * Cookie\npersonalization_id\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to integrate and share features for social media and also store information about how the user uses the website, for tracking and targeting.\n\n\n  * Cookie\nguest_id\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to identify and track the website visitor. It registers if a user is signed in to the Twitter platform and collects information about ad preferences.\n\n\n  * Cookie\nbcookie\n  * Duration\n1 year\n  * Description\nLinkedIn sets this cookie from LinkedIn share buttons and ad tags to recognize browser IDs.\n\n\n  * Cookie\n__Secure-ROLLOUT_TOKEN\n  * Duration\n6 months\n  * Description\nYouTube sets this cookie to manage feature rollout and experimentation. It helps Google control which new features or interface changes are shown to users as part of testing and staged rollouts, ensuring consistent experience for a given user during an experiment.\n\n\n  * Cookie\nyt.innertube::nextId\n  * Duration\nNever Expires\n  * Description\nYouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.\n\n\n  * Cookie\nyt.innertube::requests\n  * Duration\nNever Expires\n  * Description\nYouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.\n\n\n  * Cookie\nsession_tracker\n  * Duration\nsession\n  * Description\nThis cookie is set by the Reddit. This cookie is used to identify trusted web traffic. It also helps in adverstising on the website.\n\n\n  * Cookie\nedgebucket\n  * Duration\nsession\n  * Description\nReddit sets this cookie to save the information about a log-on Reddit user, for the purpose of advertisement recommendations and updating the content.\n\n\n  * Cookie\ndid\n  * Duration\n1 year\n  * Description\nArbor sets this cookie to show targeted ads to site visitors.This cookie expires after 2 months or 1 year.\n\n\nUncategorised\nOther uncategorised cookies are those that are being analysed and have not been classified into a category as yet.\nNo cookies to display.\nReject All Save My Preferences Accept All\nToggle Search[](https://towardsdatascience.com/)Toggle Mobile Navigation\n[](https://towardsdatascience.com/)\nPublish AI, ML & data-science insights to a global community of data professionals.\nSign in[Submit an Article](https://write.insightmediagroup.io)\n[Latest](https://towardsdatascience.com/latest/)[Editor's Picks](https://towardsdatascience.com/tag/editors-pick/)[Newsletter](https://towardsdatascience.com/tag/the-variable/)[ShipAI](https://towardsdatascience.com/shipai/)\n* * *\n[Write For TDS](https://towardsdatascience.com/submissions/)\n[LinkedIn](https://www.linkedin.com/company/towards-data-science/)[X](https://x.com/TDataScience)Toggle Search\n[Artificial Intelligence](https://towardsdatascience.com/category/artificial-intelligence/)\n# TimeGPT vs TiDE: Is Zero-Shot Inference the Future of Forecasting or Just Hype?\nFoundational models: A comprehensive comparison of TimeGPT and TiDE in time series forecasting\n[Luís Roque](https://towardsdatascience.com/author/luisroque/)\nMarch 14, 202413 min read\n_This post was co-authored with Rafael Guedes._\n## Introduction\nForecasting is one of the core domains of Artificial Intelligence (AI) in academic research and industrial applications. In fact, it is probably one of the most ubiquitous challenges we can find across all industries. Accurately predicting future sales volumes and market trends is essential for businesses to optimize their planning processes. This includes enhancing contribution margins, minimizing waste, ensuring adequate inventory levels, optimizing the supply chain, and improving decision-making overall.\nDeveloping a forecast model represents a complex and multifaceted challenge. It requires a deep understanding of State-Of-The-Art (SOTA) forecasting methodologies and the specific business domain to which they are applied. Furthermore, the forecast engine will act as a critical infrastructure within an organization, supporting a broad spectrum of processes across various departments. For instance:\nLearn this step by step with the interactive [AI Engineer](https://roadmap.sh/ai-engineer), [AI and Data Scientist](https://roadmap.sh/ai-data-scientist) and [Machine Learning](https://roadmap.sh/machine-learning) roadmaps.\n  * The **Marketing team** leverages the model to inform strategic decisions regarding investment allocations for upcoming periods, such as the next month or quarter.\n  * The **Procurement team** utilizes the model to make informed decisions about purchase quantities and timing from suppliers, optimizing inventory levels and reducing waste or shortages.\n  * The **Operations team** uses the forecasts to optimize the production lines. They can deploy resources and workforce to meet expected demand while minimizing operational costs.\n  * The **Finance team** relies on the model for budgeting purposes, using forecast data to project monthly financial requirements and allocate resources accordingly.\n  * The **Customer Service team** uses the forecast to anticipate customer inquiry volumes, allowing the team to right-size staffing levels while ensuring high-quality customer service and minimizing wait times.\n\n\nRecent advancements in forecasting have also been shaped by the successful development of foundational models across various domains, including text (e.g., ChatGPT), text-to-image (e.g., Midjourney), and text-to-speech (e.g., Eleven Labs). The wide adoption of these models has resulted in the introduction of models like TimeGPT [1], designed to generate predictions on previously unseen data through zero-shot inference. These models leverage the methodologies and architectures that resemble their predecessors in text, image, and speech. A general pre-trained model would constitute a paradigm shift in tackling forecasting tasks. It would make it more accessible to organizations, reduce the computation complexity, and make it more accurate overall.\nIn this article, we provide an in-depth explanation of the possible architecture behind TimeGPT. We also cover the main components that allow the model to perform zero-shot inference. Following this theoretical overview, we then apply TimeGPT to a specific use case and dataset. We cover the practical implementation details and conduct a thorough analysis of the model's performance. Finally, we compare the performance of TimeGPT with TiDE [2], an 'embarrassingly' simple MLP that beats Transformers in forecasting use cases.\n![Figure 1: TimeGPT \\(image by author with DALL-E\\)](../images/000.jpeg)\nFigure 1: TimeGPT (image by author with DALL-E)\nAs always, the code is available on our [GitHub](https://github.com/zaai-ai/lab).\n## TimeGPT\nTimeGPT [1] was the first foundation model for time series forecasting, characterized by its ability to generalize across diverse domains. It can produce precise forecasts on datasets beyond those used during its training phase. The field of research surrounding foundation models for time series forecasting has been experiencing significant growth recently. Notable recent contributions include \"MOMENT\" developed by researchers at Carnegie Mellon University (CMU) [3], \"TimesFM\" from Google [4], \"Lag-Llama,\" a collaborative effort between Morgan Stanley and ServiceNow [5], and \"Moirai\" from Salesforce [6]. We plan to cover other time series foundational models for time series forecasting in the future.\nTimeGPT leverages transfer learning to perform well in a zero-shot inference setup. It was trained with 100 billion data points from a large collection of publicly available datasets of various domains such as economics, demographics, healthcare, weather, IoT sensor data, energy, web traffic, sales, transport, and banking.\nThe extensive diversity of domains allows the model to capture complex patterns such as multiple seasonalities, cycles of different lengths, and evolving trends. Additionally, the datasets exhibit a range of noise levels, outliers, drift, and other characteristics. While some consist of clean data with regular patterns, others have unexpected events and behaviors where trends and patterns may fluctuate over time. These challenges provide many scenarios for the model to learn from, improving its robustness and generalization capabilities.\n![Figure 2: TimeGPT was trained on a collection of public datasets with different sizes and granularities to forecast unseen time series accurately without re-training \\(source\\).](../images/001.png)\nFigure 2: TimeGPT was trained on a collection of public datasets with different sizes and granularities to forecast unseen time series accurately without re-training ([source](https://arxiv.org/pdf/2310.03589.pdf)).\n## Architecture\nTimeGPT is a Transformer-based model specifically designed for time series forecasting, incorporating a self-attention mechanism within an encoder-decoder architecture. By leveraging the self-attention mechanism, it can dynamically weigh the significance of different points in the time series.\nThe model receives a window of historical values (_y_) and exogenous covariates (_x_) as input. The covariates may include additional time series data and/or binary variables that denote specific events, such as public holidays. These inputs are augmented with sequential information by integrating local positional embeddings. This allows the model to be aware of the temporal dependencies. While not explicitly stated by the authors, we believe all the inputs are concatenated after the positional encoding, producing the final input to feed the encoder.\n![Figure 3: Process of adding positional embeddings to the input data and concatenating all inputs in a final input vector \\(image by author\\)](../images/002.png)\nFigure 3: Process of adding positional embeddings to the input data and concatenating all inputs in a final input vector (image by author)\nThe positional encodings are also not defined by the authors. We assume that they use the sine and cosine functions from the foundational transformer architecture paper [7]. These functions are characterized by varying frequencies but maintain the same dimensionality as the input data.\n![Equations 1: sine and cosine functions that generate positional embeddings where pos is the position, i is the dimension of the positional encoding, and _dmodel is the total dimension of the vector.](../images/003.png)\nEquations 1: sine and cosine functions that generate positional embeddings where _pos_ is the position, _i_ is the dimension of the positional encoding, and _d _model_ is the total dimension of the vector.\nOnce augmented with positional encodings, the input vector is introduced into the encoder. Within the encoder, a multi-head attention layer evaluates and assigns weights to the various elements within the input sequence, reflecting their relative importance. Subsequently, this representation is processed by a fully connected feed-forward network. It allows the generation of a representation that captures more complex relationships between the elements in the sequence. The output is then fed to the decoder part of the architecture.\n![Figure 4: The Encoder receives the vector resulting from the addition between the input and the positional encoding and generates a new vector to feed the decoder \\(image by author\\)](../images/004.png)\nFigure 4: The Encoder receives the vector resulting from the addition between the input and the positional encoding and generates a new vector to feed the decoder (image by author)\nIn addition to processing the encoder's output, the decoder operates in an auto-regressive process. It incorporates previously generated outputs before producing the forecasts of the subsequent time step (_i+1)_. It leverages the attention mechanism to capture the complex relationships between the hidden states produced by the encoder and the previously generated outputs. This approach enables the decoder to effectively synthesize the contextual and sequential information encapsulated in the encoder's representations with its own iterative predictions.\n![Figure 5: Decoder receives as input the output of the encoder and previous predictions position encoded \\(image by author\\)](../images/005.png)\nFigure 5: Decoder receives as input the output of the encoder and previous predictions position encoded (image by author)\nFinally, the linear layer is responsible for mapping the decoder's output to a vector of values with the same length as the forecast horizon (_h_).\n![Figure 6: A linear layer receives the output of the decoder as input and produces the final forecast with the same dimension as the forecast horizon \\(image by author\\)](../images/006.png)\nFigure 6: A linear layer receives the output of the decoder as input and produces the final forecast with the same dimension as the forecast horizon (image by author)\nTimeGPT can generate a probabilistic distribution of potential outcomes, i.e., the estimation of forecast intervals. The authors relied on conformal prediction [8] based on historical errors to estimate the forecast intervals. Unlike traditional methods, conformal prediction does not require distributional assumptions, and it can be achieved by:\n  1. Creating _M_ training and calibration sets;\n  2. Forecasting each calibration set with the model;\n  3. For each forecast horizon _h_ , the absolute residual values between the model's predictions and the actual outcomes within the calibration set are calculated. These calculated residuals are called nonconformity scores.\n  4. We select a specific quantile from the distribution of nonconformity scores for each forecast horizon _h_. The chosen quantile determines the forecast interval's coverage level, with higher quantiles resulting in broader intervals.\n\n\nThe forecast intervals are given by the predicted value ± the final nonconformity score.\n![Figure 7: Conformal Prediction process \\(image by author\\)](../images/007.png)\nFigure 7: Conformal Prediction process (image by author)\n## TimeGPT vs. TiDE: a comparison in a real use case\nIn this section, we will use TimeGPT to forecast sales using a real-world dataset from one of our clients. Subsequently, we compare the forecasting performance of TimeGPT with TiDE, using the same cutoff date for analysis.\nTiDE [2] is a novel multivariate time-series model that can use static covariates (e.g., brand of a product) and known or unknown dynamic covariates in the forecast horizon (e.g., price of a product) to generate an accurate forecast. Unlike the complex architecture of Transformers, TiDE is based on a simple Encoder-Decoder architecture with a Residual connection where:\n  * The **Encoder** is responsible for mapping the past target values and the covariates of a time series into a dense representation of features. First, the f**eature projection** reduces the dimensionality of the dynamic covariates. Then, the **Dense Encoder** receives the output of the Feature Projection concatenated with static covariates and the past values to map them into a single embedding representation.\n  * The **Decoder** receives the embedding representation and converts it into future predictions. The **Dense Decoder** maps the embedding representation into a vector per time-step in the horizon. Afterward, the **Temporal Decoder** combines the output of the Dense Decoder with the projected features of that time step to produce the predictions.\n  * Finally, the **Residual Connection** linearly maps the look-back to a vector with the size of the horizon, which is added to the output of the Temporal Decoder to produce the final predictions.\n\n\n![Figure 8: TiDE architecture \\(source\\)](../images/008.png)\nFigure 8: TiDE architecture ([source](https://arxiv.org/pdf/2304.08424.pdf))\nThe dataset contains 195 unique time series, each detailing weekly sales data specifically for the United States market. In addition to historical sales data, the dataset has information on two types of marketing events. We incorporate US public holidays and binary seasonal features to augment the dataset, in this case, week and month identifiers. The forecasting horizon is 16 weeks, i.e., we want to predict 16 weeks into the future.\nWe start by importing the libraries:\njavascript\n\n```\nimport matplotlib.pyplot as plt\nimport os\nimport pandas as pd\nimport utils\n\nfrom nixtlats import TimeGPT\nfrom nixtlats.date_features import CountryHolidays\nfrom dotenv import load_dotenv\nfrom sklearn.preprocessing import MinMaxScaler, OrdinalEncoder\n\nload_dotenv()\n```\n\nThen, we initiate the TimeGPT class by providing a TimeGPT token. You can request one from the Nixtla website.\ncsharp\n\n```\ntimegpt = TimeGPT(token = os.environ.get(\"TIMEGPT_KEY\"))\ntimegpt.validate_token()\n```\n\n> INFO:nixtlats.timegpt:Happy Forecasting! :), If you have questions or need support, please email ops@nixtla.io\nWhen preparing to load your dataset after validating the authentication token, ensure the following:\n  * The target variable should be numeric and without missing values.\n  * Ensure no gaps exist in the date sequence from the start to the end date.\n  * The date column must be in a format recognizable by Pandas.\n  * Per the documentation, data normalization is handled internally. Therefore, you can skip that step.\n  * For forecasting multiple time series, include a column to uniquely identify each series, which will be used as an argument in the forecasting function.\n  * Exogenous features require a separate dataset for the forecast horizon.\n\n\nini\n\n```\n# read data frame and parse dates as datetime\ndf = pd.read_csv('data/data.csv', parse_dates=['delivery_week'])\n```\n\nAs discussed, to augment the dataset, we add binary seasonal features for week and month as follows:\nbash\n\n```\n# add week and month to df\ndf['week'] = df['delivery_week'].dt.isocalendar().week\ndf['month'] = df['delivery_week'].dt.month\n\n# one hot encode week and month\ndf = pd.get_dummies(df, columns=['week', 'month'], dtype=int)\n```\n\nNow, we can truncate our dataset to be used by TimeGPT for forecasting. Additionally, we will create a holdout set with the actual sales data within the forecast horizon and the corresponding exogenous features for the same period.\nbash\n\n```\n# Truncate data frame \nforecast_df = df[df['delivery_week'] < \"2023-10-16\"]\n\n# Let's use the last x weeks of actuals for the holdout set \nholdout_df = df[(df['delivery_week'] >= \"2023-10-16\") &amp; (df['delivery_week'] <= \"2024-02-05\")]\n```\n\nAfter splitting the data, we can proceed to feed the training and holdout datasets into the `forecast()` function. We need to set the following parameters:\n  * `df` - data frame with historical data\n  * `time_col` - column with temporal information\n  * `target_col` - column with historical data\n  * `X_df` - data frame with exogenous features for the forecast horizon\n  * `date_features` - allows the specification of new exogenous features like the public holidays in the US\n  * `h` - define the forecast horizon\n  * `level` - forecast intervals (80% confidence)\n  * `freq` - frequency of the data, in our case, it is weekly on Monday\n  * `id_col` - column that identifies each time series in a multivariate scenario\n  * `model` - TimeGPT has two models one for short term and another for long term. The long-term should be used when there is more than one seasonal period in the forecast horizon.\n  * `add_history` - return the fitted values in historical data\n\n\nbash\n\n```\n# create list with seasonal exogenous features\nEXOGENOUS_FAETURES = [x for x in df.columns if ('week_' in x) | ('month_' in x)]\n\ntimegpt_fcst_ex_vars_df = timegpt.forecast(\n    df=forecast_df[['unique_id', 'delivery_week', 'target', 'marketing_events_1', 'marketing_events_2']+EXOGENOUS_FAETURES],\n    time_col='delivery_week',\n    target_col='target',\n    X_df=holdout_df[['unique_id', 'delivery_week', 'marketing_events_1', 'marketing_events_2']+EXOGENOUS_FAETURES],\n    date_features=[CountryHolidays(['US'])],\n    h=17,\n    level=[80],\n    freq='W-MON',\n    id_col='unique_id',\n    model='timegpt-1',\n    add_history=True,\n    )\n```\n\nThe forecast takes just a few minutes to run. It then returns a data frame with the fitted values for historical data and the predictions for the forecast horizon. It also returns the importance of the exogenous covariates in the forecast.\ncsharp\n\n```\ntimegpt.weights_x.head(10).sort_values(by='weights').plot.barh(x='features', y='weights')\nplt.title('Feature Importance - top 10')\nplt.show()\n```\n\nIn our case, we extracted the ten most important covariates, which shows that the marketing events have the highest importance. Conversely, the seasonal and holidays covariates have a residual importance.\n![Figure 9: TimeGPT exogenous covariates importance \\(image made by the author\\)](../images/009.png)\nFigure 9: TimeGPT exogenous covariates importance (image made by the author)\nSince we set `add_history=True`, we can plot the fitted values and the predictions. We selected the six series with the highest volume in the holdout set. They are more relevant for the business and likely easier to forecast with more stable patterns.\npython\n\n```\n# get series ordered by volume in a descending way\nseries = holdout_df.groupby('unique_id')['target'].sum().reset_index().sort_values(by='target', ascending=False)['unique_id'].tolist()\n\ntimegpt.plot(\n    forecast_df[['unique_id', 'delivery_week', 'target']], \n    timegpt_fcst_ex_vars_df,\n    time_col='delivery_week',\n    target_col='target',\n    unique_ids=series[:6],\n    level=[80], \n)\n```\n\n![Figure 10: TimeGPT fitted values and forecast \\(image by author\\)](../images/body-1bb5826e7630adfeb7e1.png)\nFigure 10: TimeGPT fitted values and forecast (image by author)\nFigure 10 shows that while the fitted values align well with the actual values, the forecasts are inconsistent. They show uniform patterns across most series except in one case (we can find it in the top right corner). Additionally, all predictions show consecutive unexpected spikes, which we did not expect to see.\nHaving obtained the forecast from TimeGPT, we can now load the forecast generated by TiDE and compute forecasting performance metrics for comparison. We have used the Mean Absolute Percentage Error (MAPE) as our comparison metric to maintain confidentiality and prevent the disclosure of actual sales volumes.\npython\n\n```\n# load the forecast from TiDE and TimeGPT\ntide_model_df = pd.read_csv('data/tide.csv', parse_dates=['delivery_week'])\ntimegpt_fcst_ex_vars_df = pd.read_csv('data/timegpt.csv', parse_dates=['delivery_week'])\n\n# merge data frames with TiDE forecast and actuals\nmodel_eval_df = pd.merge(holdout_df[['unique_id', 'delivery_week', 'target']], tide_model_df[['unique_id', 'delivery_week', 'forecast']], on=['unique_id', 'delivery_week'], how='inner')\n\n# merge data frames with TimeGPT forecast and actuals\nmodel_eval_df = pd.merge(model_eval_df, timegpt_fcst_ex_vars_df[['unique_id', 'delivery_week', 'TimeGPT']], on=['unique_id', 'delivery_week'], how='inner')\n\nutils.plot_model_comparison(model_eval_df)\n```\n\n![Figure 11: MAPE comparison between TiDE and TimeGPT \\(image by author\\)](../images/body-8e80061f368d09960dcc.png)\nFigure 11: MAPE comparison between TiDE and TimeGPT (image by author)\nAs shown in Figure 11, TiDE has a lower average MAPE when compared to TimeGPT across the 195-time series for 15 out of 16 weeks. Although both models have access to the same information, the zero-shot inference from TimeGPT did not manage to beat our fine-tuned model.\n## Conclusion\nThe significance of forecasting cannot be overstated in today's competitive landscape. Effective forecasting methods are key for organizations striving for operational excellence, enabling them to plan and manage their operations more efficiently.\nIn this article, we explored one of the most recent innovations in time series forecasting - the development of foundation models. These models aim to democratize access to sophisticated algorithms for organizations lacking the specialized expertise required to develop SOTA models in-house. While this initiative is promising, our analysis indicates that it still falls short of delivering accurate forecasts. Specifically, TiDE significantly outperformed TimeGPT in a zero-shot inference scenario.\nNevertheless, it is encouraging to witness the efforts of AI companies to push the boundaries of forecasting. While other domains, such as computer vision and NLP, have been gaining increased attention, the significance of forecasting for organizations should not be overlooked.\n## About me\nSerial entrepreneur and leader in the AI space. I develop AI products for businesses and invest in AI-focused startups.\n[Founder @ ZAAI](http://zaai.ai/) | [LinkedIn](https://www.linkedin.com/in/luisbrasroque/) | [X/Twitter](https://x.com/luisbrasroque)\n## References\n[1] Garza, A., & Mergenthaler-Canseco, M. (2023). _TimeGPT-1_. Retrieved from arXiv:2310.03589.\n[2] Abhimanyu Das, Weihao Kong, Andrew Leach, Shaan Mathur, Rajat Sen, Rose Yu. (2023) Long-term Forecasting with TiDE: Time-series Dense Encoder. arXiv:2304.08424.\n[3] Goswami, M., Szafer, K., Choudhry, A., Cai, Y., Li, S., & Dubrawski, A. (2024). _MOMENT: A Family of Open Time-series Foundation Models_. Retrieved from arXiv:2402.03885 (cs.LG).\n[4] Das, A., Kong, W., Sen, R., & Zhou, Y. (2024). _A decoder-only foundation model for time-series forecasting_. Retrieved from arXiv:2310.10688 ([cs.CL](http://cs.CL)).\n[5] Rasul, K., Ashok, A., Williams, A. R., Ghonia, H., Bhagwatkar, R., Khorasani, A., Darvishi Bayazi, M. J., Adamopoulos, G., Riachi, R., Hassen, N., Biloš, M., Garg, S., Schneider, A., Chapados, N., Drouin, A., Zantedeschi, V., Nevmyvaka, Y., & Rish, I. (2024). _Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting_. Retrieved from arXiv:2310.08278 (cs.LG).\n[6] Woo, G., Liu, C., Kumar, A., Xiong, C., Savarese, S., & Sahoo, D. (2024). _Unified Training of Universal Time Series Forecasting Transformers_. Retrieved from arXiv:2402.02592 (cs.LG).\n[7] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). _Attention Is All You Need_. Retrieved from arXiv:1706.03762.\n[8] Stankeviciute, K., Alaa, A. M., & van der Schaar, M. (2021). _Conformal time-series forecasting_. In _Advances in Neural Information Processing Systems_ (Vol. 34, pp. 6216–6228).\n## Register Now to Continue Reading\n### Unlock Towards Data Science with a Free Account\nAll articles on Towards Data Science are available to registered users. Create a free account today to access this article and thousands more.\nRegister for freeSign in to your account\n* * *\n![](../images/body-e559c46fed9235c76200.jpeg)\nWritten By\n## [Luís Roque](https://towardsdatascience.com/author/luisroque/)\n[See all from Luís Roque](https://towardsdatascience.com/author/luisroque/)\n[Artificial Intelligence](https://towardsdatascience.com/tag/artificial-intelligence/)[Data Science](https://towardsdatascience.com/tag/data-science/)[Machine Learning](https://towardsdatascience.com/tag/machine-learning/)[Python](https://towardsdatascience.com/tag/python/)[Time Series Forecasting](https://towardsdatascience.com/tag/time-series-forecasting/)\nShare This Article\n  * [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Ftowardsdatascience.com%2Ftimegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76%2F&title=TimeGPT%20vs%20TiDE%3A%20Is%20Zero-Shot%20Inference%20the%20Future%20of%20Forecasting%20or%20Just%20Hype%3F)\n  * [](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Ftowardsdatascience.com%2Ftimegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76%2F&title=TimeGPT%20vs%20TiDE%3A%20Is%20Zero-Shot%20Inference%20the%20Future%20of%20Forecasting%20or%20Just%20Hype%3F)\n  * [](https://x.com/share?url=https%3A%2F%2Ftowardsdatascience.com%2Ftimegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76%2F&text=TimeGPT%20vs%20TiDE%3A%20Is%20Zero-Shot%20Inference%20the%20Future%20of%20Forecasting%20or%20Just%20Hype%3F)\n\n\nTowards Data Science is a community publication. Submit your insights to reach our global audience and earn through the TDS Author Payment Program.\n[Write for TDS](https://towardsdatascience.com/submissions/)\n## Related Articles\n  * [![](../images/010.jpg)](https://towardsdatascience.com/predicting-soccer-league-tables-is-historical-data-the-way-to-go-840e4272f1c4/)\n## [Predicting Soccer League Tables - is Historical Data the way to go?](https://towardsdatascience.com/predicting-soccer-league-tables-is-historical-data-the-way-to-go-840e4272f1c4/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nAnalyzing the Italian Soccer League (The Serie A as it's known) reveals a lot about how sport changes quickly\n[Azaan Barlas](https://towardsdatascience.com/author/azaanbarlas/)\nNovember 17, 20218 min read\n  * [![](../images/011.jpg)](https://towardsdatascience.com/data-management-strategy-d3ce6db599c1/)\n## [Data Management Strategy](https://towardsdatascience.com/data-management-strategy-d3ce6db599c1/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nEverything you wanted to know about it and its main actors\n[Victor Roman](https://towardsdatascience.com/author/rromanss23/)\nSeptember 27, 20197 min read\n  * [![](../images/012.jpeg)](https://towardsdatascience.com/conquer-the-python-coding-round-in-data-science-interviews-5e27c4513be3/)\n## [Conquer the Python Coding Round in Data Science Interviews](https://towardsdatascience.com/conquer-the-python-coding-round-in-data-science-interviews-5e27c4513be3/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nMy experience from interviewing as a Data Scientist in 2021 in Bangalore, India.\n[Divya Choudhary](https://towardsdatascience.com/author/learnwithdivya/)\nJuly 5, 20215 min read\n  * [![](../images/013.jpg)](https://towardsdatascience.com/a-sustainable-supply-chain-template-with-geospatial-calculations-in-python-f99a20a43df4/)\n## [A Sustainable Supply Chain Template with Geospatial Calculations in Python](https://towardsdatascience.com/a-sustainable-supply-chain-template-with-geospatial-calculations-in-python-f99a20a43df4/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nA supply chain network footprint should include greenhouse gas calculations for both transportation and distribution centers\n[Sabi Horvat](https://towardsdatascience.com/author/sabolch-horvat/)\nApril 25, 20235 min read\n  * [![](../images/014.png)](https://towardsdatascience.com/data-cleaning-and-analysis-with-a-bonus-story-36b3ae39564c/)\n## [Data Cleaning and Analysis with a Bonus Story](https://towardsdatascience.com/data-cleaning-and-analysis-with-a-bonus-story-36b3ae39564c/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nPeople are the most critical part of businesses. People create value for people and sell it to people. Therefore, changes on people and...\n[Soner Yıldırım](https://towardsdatascience.com/author/sonery/)\nJanuary 5, 202012 min read\n  * [![](../images/015.jpeg)](https://towardsdatascience.com/8-tips-for-creating-data-visualizations-in-python-using-bokeh-d7a01701503d/)\n## [8 Tips for Creating Data Visualizations in Python using Bokeh](https://towardsdatascience.com/8-tips-for-creating-data-visualizations-in-python-using-bokeh-d7a01701503d/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nQuick tips and examples to create data visualizations using the Bokeh library\n[Payal Patel](https://towardsdatascience.com/author/payal-patel/)\nDecember 16, 202211 min read\n  * [![](../images/016.jpeg)](https://towardsdatascience.com/pandas-remove-unwanted-parts-from-strings-92ac881e60a2/)\n## [How To Remove Unwanted Parts From Strings in Pandas](https://towardsdatascience.com/pandas-remove-unwanted-parts-from-strings-92ac881e60a2/)\n[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)\nRemoving unwanted sub-strings from a column in Pandas\n[Giorgos Myrianthous](https://towardsdatascience.com/author/gmyrianthous/)\nMarch 29, 20225 min read\n  * [![](../images/017.jpg)](https://towardsdatascience.com/data-platforms-liberate-data-from-your-legacy-systems-669b643e3124/)\n## [Data Platforms - Liberate Data From Your Legacy Systems](https://towardsdatascience.com/data-platforms-liberate-data-from-your-legacy-systems-669b643e3124/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nThe potential of data analytics is often held back by ancient and diverse legacy system scattered across the company. However, data and...\n[Wouter van Heeswijk, PhD](https://towardsdatascience.com/author/wvheeswijk/)\nOctober 10, 20217 min read\n  * [![](../images/018.png)](https://towardsdatascience.com/data-sources-are-getting-standardized-can-analytics-data-science-and-ml-keep-up-8185a6c4ac4a/)\n## [Data sources are getting standardized; can analytics, data science, and ML keep up?](https://towardsdatascience.com/data-sources-are-getting-standardized-can-analytics-data-science-and-ml-keep-up-8185a6c4ac4a/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nA stance on the opportunity for out-of-the-box insight for standard schemas\n[Charles Zhu](https://towardsdatascience.com/author/charleszhu_4848/)\nOctober 23, 202011 min read\n\n\n  * [YouTube](https://www.youtube.com/c/TowardsDataScience)\n  * [X](https://x.com/TDataScience)\n  * [LinkedIn](https://www.linkedin.com/company/towards-data-science/)\n  * [Threads](https://www.threads.net/@towardsdatascience)\n  * [Bluesky](https://bsky.app/profile/towardsdatascience.com)\n\n\n[](https://towardsdatascience.com/)\nYour home for data science and AI. The world's leading publication for data science, data analytics, data engineering, machine learning, and artificial intelligence professionals.\nSubscribe to Our Newsletter[Write For TDS](https://towardsdatascience.com/submissions/)•[About](https://towardsdatascience.com/about-towards-data-science-d691af11cc2f/)•[Advertise](https://contact.towardsdatascience.com/advertise-with-towards-data-science)•[Privacy Policy](https://towardsdatascience.com/privacy-policy/)•[Terms of Use](https://towardsdatascience.com/website-terms-of-use/)\n© Insight Media Group, LLC 2026•[The New Stack](https://thenewstack.io)•[roadmap.sh](https://roadmap.sh)•[Creator Network](https://insightmediagroup.io/creator-network)\n",
  "metadata": {
    "title": "TimeGPT vs TiDE: Is Zero-Shot Inference the Future of Forecasting or Just Hype? | Towards Data Science",
    "description": "Foundational models: A comprehensive comparison of TimeGPT and TiDE in time series forecasting",
    "keywords": null,
    "author": "Luís Roque",
    "og:locale": "en_US",
    "og:type": "article",
    "og:title": "TimeGPT vs TiDE: Is Zero-Shot Inference the Future of Forecasting or Just Hype?",
    "og:description": "Foundational models: A comprehensive comparison of TimeGPT and TiDE in time series forecasting",
    "og:url": "https://towardsdatascience.com/timegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76/",
    "og:site_name": "Towards Data Science",
    "og:image": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1Om753WcPgkV53S0BTQDBEg.jpeg",
    "og:image:width": "2000",
    "og:image:height": "2000",
    "og:image:type": "image/jpeg",
    "twitter:card": "summary_large_image",
    "twitter:site": "@TDataScience",
    "twitter:creator": "@TDataScience",
    "twitter:label1": "Written by",
    "twitter:data1": "Luís Roque",
    "twitter:label2": "Est. reading time",
    "twitter:data2": "13 min read",
    "article:published_time": "2024-03-14T01:20:28.000Z",
    "article:modified_time": "2024-03-14T01:20:28.000Z",
    "article:author": "https://towardsdatascience.com/author/luisroque/"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 202,
    "error": ""
  },
  "code_blocks": [
    {
      "language": "txt",
      "file": "attachments/650517ad2b7b/code/block_000.txt",
      "chars": 265
    },
    {
      "language": "txt",
      "file": "attachments/650517ad2b7b/code/block_001.txt",
      "chars": 82
    },
    {
      "language": "txt",
      "file": "attachments/650517ad2b7b/code/block_002.txt",
      "chars": 111
    },
    {
      "language": "txt",
      "file": "attachments/650517ad2b7b/code/block_003.txt",
      "chars": 220
    },
    {
      "language": "txt",
      "file": "attachments/650517ad2b7b/code/block_004.txt",
      "chars": 237
    },
    {
      "language": "txt",
      "file": "attachments/650517ad2b7b/code/block_005.txt",
      "chars": 633
    },
    {
      "language": "txt",
      "file": "attachments/650517ad2b7b/code/block_006.txt",
      "chars": 142
    },
    {
      "language": "txt",
      "file": "attachments/650517ad2b7b/code/block_007.txt",
      "chars": 391
    },
    {
      "language": "txt",
      "file": "attachments/650517ad2b7b/code/block_008.txt",
      "chars": 700
    }
  ],
  "images": [
    {
      "status": "ok",
      "url": "https://cdn-cookieyes.com/assets/images/revisit.svg",
      "bytes": 2339,
      "reused": false,
      "content_type": "image/svg+xml",
      "local_path": "attachments/650517ad2b7b/images/body-df29beacd7496220cc94.svg",
      "src": "https://cdn-cookieyes.com/assets/images/revisit.svg",
      "alt": "Revisit consent button",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://cdn-cookieyes.com/assets/images/close.svg",
      "bytes": 1345,
      "reused": false,
      "content_type": "image/svg+xml",
      "local_path": "attachments/650517ad2b7b/images/body-2159bb67f3de8ad870eb.svg",
      "src": "https://cdn-cookieyes.com/assets/images/close.svg",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1Om753WcPgkV53S0BTQDBEg.jpeg",
      "bytes": 545963,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/000.jpeg",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1Om753WcPgkV53S0BTQDBEg.jpeg",
      "alt": "Figure 1: TimeGPT \\(image by author with DALL-E\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1ru6BmRvagdDpelMN-TmpBA.png",
      "bytes": 580125,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/001.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1ru6BmRvagdDpelMN-TmpBA.png",
      "alt": "Figure 2: TimeGPT was trained on a collection of public datasets with different sizes and granularities to forecast unseen time series accurately without re-training \\(source\\).",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1XU-R1iV9R-VSom_FK3Xxpw.png",
      "bytes": 89208,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/002.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1XU-R1iV9R-VSom_FK3Xxpw.png",
      "alt": "Figure 3: Process of adding positional embeddings to the input data and concatenating all inputs in a final input vector \\(image by author\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1ti8IurpiJJ2EO4cpdowxug.png",
      "bytes": 86486,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/003.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1ti8IurpiJJ2EO4cpdowxug.png",
      "alt": "Equations 1: sine and cosine functions that generate positional embeddings where pos is the position, i is the dimension of the positional encoding, and _dmodel is the total dimension of the vector.",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1-QNj8KMsJhwXECPPhL95Kw.png",
      "bytes": 265121,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/004.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1-QNj8KMsJhwXECPPhL95Kw.png",
      "alt": "Figure 4: The Encoder receives the vector resulting from the addition between the input and the positional encoding and generates a new vector to feed the decoder \\(image by author\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1NU7-q18M0Dq2MvBoC8Af_A.png",
      "bytes": 268354,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/005.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1NU7-q18M0Dq2MvBoC8Af_A.png",
      "alt": "Figure 5: Decoder receives as input the output of the encoder and previous predictions position encoded \\(image by author\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1FA3h3Uhv5GT5uHADRrMuog.png",
      "bytes": 317820,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/006.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1FA3h3Uhv5GT5uHADRrMuog.png",
      "alt": "Figure 6: A linear layer receives the output of the decoder as input and produces the final forecast with the same dimension as the forecast horizon \\(image by author\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1Po__QFqEgK18E5ng0UTTDg.png",
      "bytes": 221817,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/007.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1Po__QFqEgK18E5ng0UTTDg.png",
      "alt": "Figure 7: Conformal Prediction process \\(image by author\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1s5LFMO_ukVTiEUy2PBZxrg.png",
      "bytes": 1026979,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/008.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1s5LFMO_ukVTiEUy2PBZxrg.png",
      "alt": "Figure 8: TiDE architecture \\(source\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1PZ6GrGO1yCPpCmYY3ZflMw.png",
      "bytes": 175591,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/009.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1PZ6GrGO1yCPpCmYY3ZflMw.png",
      "alt": "Figure 9: TimeGPT exogenous covariates importance \\(image made by the author\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1ONNejX5fSvcLPZRmRhw0Cw.png",
      "bytes": 382805,
      "reused": false,
      "content_type": "image/png",
      "local_path": "attachments/650517ad2b7b/images/body-1bb5826e7630adfeb7e1.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1ONNejX5fSvcLPZRmRhw0Cw.png",
      "alt": "Figure 10: TimeGPT fitted values and forecast \\(image by author\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1RwBNuv3lvIt2DCHsBkYt-A.png",
      "bytes": 87357,
      "reused": false,
      "content_type": "image/png",
      "local_path": "attachments/650517ad2b7b/images/body-8e80061f368d09960dcc.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1RwBNuv3lvIt2DCHsBkYt-A.png",
      "alt": "Figure 11: MAPE comparison between TiDE and TimeGPT \\(image by author\\)",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/1787657097530_bymdsj.jpeg",
      "bytes": 16497,
      "reused": false,
      "content_type": "image/jpeg",
      "local_path": "attachments/650517ad2b7b/images/body-e559c46fed9235c76200.jpeg",
      "src": "https://assets.insightmediagroup.io/media/1787657097530_bymdsj.jpeg",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2021/11/0PhqJppWjrAq7K1Fv-scaled.jpg",
      "bytes": 1204128,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/010.jpg",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2021/11/0PhqJppWjrAq7K1Fv-scaled.jpg",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2019/09/0bOOFpDZUImJlxxVP.jpg",
      "bytes": 108643,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/011.jpg",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2019/09/0bOOFpDZUImJlxxVP.jpg",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2021/07/1qk09eikKngIG3nHs9DMXUQ.jpeg",
      "bytes": 92157,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/012.jpeg",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2021/07/1qk09eikKngIG3nHs9DMXUQ.jpeg",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2023/04/0rBu70-VDBtttRCzP-scaled.jpg",
      "bytes": 415024,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/013.jpg",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2023/04/0rBu70-VDBtttRCzP-scaled.jpg",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2020/01/1Dml0SXUjv4nxefbyW4fUWg.png",
      "bytes": 32288,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/014.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2020/01/1Dml0SXUjv4nxefbyW4fUWg.png",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2022/08/1eTt4AjMkfJhrcYjiTmHwwA-scaled.jpeg",
      "bytes": 234585,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/015.jpeg",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2022/08/1eTt4AjMkfJhrcYjiTmHwwA-scaled.jpeg",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2022/03/1wGqRgZuz3vyCrmwo4yUP-A-scaled.jpeg",
      "bytes": 195429,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/016.jpeg",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2022/03/1wGqRgZuz3vyCrmwo4yUP-A-scaled.jpeg",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2021/10/0cxB2tjdFjpXSK6O4-scaled.jpg",
      "bytes": 415671,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/017.jpg",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2021/10/0cxB2tjdFjpXSK6O4-scaled.jpg",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    },
    {
      "status": "ok",
      "url": "https://assets.insightmediagroup.io/media/wp-content/uploads/2020/10/0zJGZybYp8xUopyzR.png",
      "bytes": 55805,
      "reused": true,
      "local_path": "attachments/650517ad2b7b/images/018.png",
      "src": "https://assets.insightmediagroup.io/media/wp-content/uploads/2020/10/0zJGZybYp8xUopyzR.png",
      "alt": "",
      "downloaded": true,
      "discovery": "saved_markdown"
    }
  ],
  "audio": [],
  "videos": [
    {
      "url": "https://www.youtube.com/c/TowardsDataScience",
      "kind": "channel_reference",
      "status": "reference_only"
    }
  ],
  "links": [
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/latest/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/tag/editors-pick/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/tag/the-variable/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/shipai/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/submissions/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/category/artificial-intelligence/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/author/luisroque/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/tag/artificial-intelligence/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/tag/data-science/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/tag/machine-learning/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/tag/python/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/tag/time-series-forecasting/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/predicting-soccer-league-tables-is-historical-data-the-way-to-go-840e4272f1c4/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/category/data-science/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/author/azaanbarlas/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/data-management-strategy-d3ce6db599c1/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/author/rromanss23/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/conquer-the-python-coding-round-in-data-science-interviews-5e27c4513be3/"
    },
    {
      "type": "internal",
      "href": "https://towardsdatascience.com/author/learnwithdivya/"
    },
    {
      "type": "external",
      "href": "https://write.insightmediagroup.io"
    },
    {
      "type": "external",
      "href": "https://www.linkedin.com/company/towards-data-science/"
    },
    {
      "type": "external",
      "href": "https://x.com/TDataScience"
    },
    {
      "type": "external",
      "href": "https://roadmap.sh/ai-engineer"
    },
    {
      "type": "external",
      "href": "https://roadmap.sh/ai-data-scientist"
    },
    {
      "type": "external",
      "href": "https://roadmap.sh/machine-learning"
    },
    {
      "type": "external",
      "href": "https://github.com/zaai-ai/lab"
    },
    {
      "type": "external",
      "href": "https://arxiv.org/pdf/2310.03589.pdf"
    },
    {
      "type": "external",
      "href": "https://arxiv.org/pdf/2304.08424.pdf"
    },
    {
      "type": "external",
      "href": "mailto:ops@nixtla.io"
    },
    {
      "type": "external",
      "href": "http://zaai.ai/"
    },
    {
      "type": "external",
      "href": "https://www.linkedin.com/in/luisbrasroque/"
    },
    {
      "type": "external",
      "href": "https://x.com/luisbrasroque"
    },
    {
      "type": "external",
      "href": "http://cs.cl"
    },
    {
      "type": "external",
      "href": "https://www.facebook.com/sharer/sharer.php?title=TimeGPT+vs+TiDE%3A+Is+Zero-Shot+Inference+the+Future+of+Forecasting+or+Just+Hype%3F&u=https%3A%2F%2Ftowardsdatascience.com%2Ftimegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76%2F"
    },
    {
      "type": "external",
      "href": "https://www.linkedin.com/shareArticle?mini=true&title=TimeGPT+vs+TiDE%3A+Is+Zero-Shot+Inference+the+Future+of+Forecasting+or+Just+Hype%3F&url=https%3A%2F%2Ftowardsdatascience.com%2Ftimegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76%2F"
    },
    {
      "type": "external",
      "href": "https://x.com/share?text=TimeGPT+vs+TiDE%3A+Is+Zero-Shot+Inference+the+Future+of+Forecasting+or+Just+Hype%3F&url=https%3A%2F%2Ftowardsdatascience.com%2Ftimegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76%2F"
    },
    {
      "type": "external",
      "href": "https://www.youtube.com/c/TowardsDataScience"
    },
    {
      "type": "external",
      "href": "https://www.threads.net/@towardsdatascience"
    },
    {
      "type": "external",
      "href": "https://bsky.app/profile/towardsdatascience.com"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-20T17:24:04Z",
  "source_url": "https://towardsdatascience.com/timegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76/",
  "delivery_status": "unverified",
  "discovery_status": "http_403",
  "missing_reason": "http_403",
  "repair_error": "",
  "actual_video_files": [],
  "expected_saved_body_images": 24,
  "image_discovery": "saved_markdown",
  "source_body_markdown": "![Revisit consent button](https://cdn-cookieyes.com/assets/images/revisit.svg)\nWe value your privacy\nWe use cookies to enhance your browsing experience, serve personalised ads or content, and analyse our traffic. By clicking \"Accept All\", you consent to our use of cookies.\nCustomise Reject All Accept All\nCustomise Consent Preferences ![](https://cdn-cookieyes.com/assets/images/close.svg)\nWe use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.\nThe cookies that are categorised as \"Necessary\" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... Show more\nNecessaryAlways Active\nNecessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.\n  * Cookie\nBCTempID\n  * Duration\n10 minutes\n  * Description\nNo description available.\n\n\n  * Cookie\n__cf_bm\n  * Duration\n1 hour\n  * Description\nThis cookie, set by Cloudflare, is used to support Cloudflare Bot Management. \n\n\n  * Cookie\nAWSALBCORS\n  * Duration\n7 days\n  * Description\nAmazon Web Services set this cookie for load balancing.\n\n\n  * Cookie\n_cfuvid\n  * Duration\nsession\n  * Description\nCloudflare sets this cookie to track users across sessions to optimize user experience by maintaining session consistency and providing personalized services\n\n\n  * Cookie\nli_gc\n  * Duration\n6 months\n  * Description\nLinkedin set this cookie for storing visitor's consent regarding using cookies for non-essential purposes.\n\n\n  * Cookie\n__hssrc\n  * Duration\nsession\n  * Description\nThis cookie is set by Hubspot whenever it changes the session cookie. The __hssrc cookie set to 1 indicates that the user has restarted the browser, and if the cookie does not exist, it is assumed to be a new session.\n\n\n  * Cookie\n__hssc\n  * Duration\n1 hour\n  * Description\nHubSpot sets this cookie to keep track of sessions and to determine if HubSpot should increment the session number and timestamps in the __hstc cookie.\n\n\n  * Cookie\nwpEmojiSettingsSupports\n  * Duration\nsession\n  * Description\nWordPress sets this cookie when a user interacts with emojis on a WordPress site. It helps determine if the user's browser can display emojis properly.\n\n\n  * Cookie\nBCSessionID\n  * Duration\n1 year 1 month 4 days\n  * Description\nBlueconic sets this cookie as a unique identifier for the BlueConic profile.\n\n\n  * Cookie\n_octo\n  * Duration\n1 year\n  * Description\nNo description available.\n\n\n  * Cookie\nlogged_in\n  * Duration\n1 year\n  * Description\nNo description available.\n\n\n  * Cookie\n__Secure-YEC\n  * Duration\npast\n  * Description\nYouTube sets this cookie to stores the user's video player preferences using embedded YouTube video\n\n\n  * Cookie\n__eoi\n  * Duration\n6 months\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nAWSALBTGCORS\n  * Duration\n7 days\n  * Description\nNo description available.\n\n\n  * Cookie\nlogin-status-p\n  * Duration\npast\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nAWSALBTG\n  * Duration\n7 days\n  * Description\nNo description available.\n\n\n  * Cookie\ncsrf_token\n  * Duration\nsession\n  * Description\nNo description available.\n\n\n  * Cookie\ntoken_v2\n  * Duration\n1 day\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nD\n  * Duration\n1 year\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nPHPSESSID\n  * Duration\nsession\n  * Description\nThis cookie is native to PHP applications. The cookie stores and identifies a user's unique session ID to manage user sessions on the website. The cookie is a session cookie and will be deleted when all the browser windows are closed.\n\n\n  * Cookie\nVISITOR_PRIVACY_METADATA\n  * Duration\n6 months\n  * Description\nYouTube sets this cookie to store the user's cookie consent state for the current domain. \n\n\n  * Cookie\ncookietest\n  * Duration\nsession\n  * Description\nThe cookietest cookie is typically used to determine whether the user's browser accepts cookies, essential for website functionality and user experience.\n\n\n  * Cookie\n__Host-airtable-session\n  * Duration\n1 year\n  * Description\nThis cookie is used to enable us to integrate the services of Airtable.\n\n\n  * Cookie\n__Host-airtable-session.sig\n  * Duration\n1 year\n  * Description\nThis cookie is used to enable us to integrate the services of Airtable.\n\n\n  * Cookie\nm\n  * Duration\n1 year 1 month 4 days\n  * Description\nStripe sets this cookie for fraud prevention purposes. It identifies the device used to access the website, allowing the website to be formatted accordingly.\n\n\n  * Cookie\nBIGipServer*\n  * Duration\nsession\n  * Description\nMarketo sets this cookie to collect information about the user's online activity and build a profile about their interests to provide advertisements relevant to the user. \n\n\n  * Cookie\n__cfruid\n  * Duration\nsession\n  * Description\nCloudflare sets this cookie to identify trusted web traffic.\n\n\n  * Cookie\n_GRECAPTCHA\n  * Duration\n6 months\n  * Description\nGoogle Recaptcha service sets this cookie to identify bots to protect the website against malicious spam attacks.\n\n\n  * Cookie\n__Secure-YNID\n  * Duration\n6 months\n  * Description\nGoogle cookie used to protect user security and prevent fraud, especially during the login process.\n\n\n  * Cookie\ncookieyes-consent\n  * Duration\n1 year\n  * Description\nCookieYes sets this cookie to remember users' consent preferences so that their preferences are respected on subsequent visits to this site. It does not collect or store any personal information about the site visitors.\n\n\nFunctional\nFunctional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.\n  * Cookie\nlidc\n  * Duration\n1 day\n  * Description\nLinkedIn sets the lidc cookie to facilitate data center selection.\n\n\n  * Cookie\nbrw\n  * Duration\n1 year\n  * Description\nNo description available.\n\n\n  * Cookie\nbrwConsent\n  * Duration\n5 minutes\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nWMF-Uniq\n  * Duration\n1 year\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nloom_anon_comment\n  * Duration\n1 year\n  * Description\nNo description available.\n\n\n  * Cookie\nloom_referral_video\n  * Duration\nsession\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nVISITOR_INFO1_LIVE\n  * Duration\n6 months\n  * Description\nA cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.\n\n\n  * Cookie\nyt-remote-connected-devices\n  * Duration\nNever Expires\n  * Description\nYouTube sets this cookie to store the user's video preferences using embedded YouTube videos.\n\n\n  * Cookie\nytidb::LAST_RESULT_ENTRY_KEY\n  * Duration\nNever Expires\n  * Description\nThe cookie ytidb::LAST_RESULT_ENTRY_KEY is used by YouTube to store the last search result entry that was clicked by the user. This information is used to improve the user experience by providing more relevant search results in the future.\n\n\n  * Cookie\nyt-remote-device-id\n  * Duration\nNever Expires\n  * Description\nYouTube sets this cookie to store the user's video preferences using embedded YouTube videos.\n\n\n  * Cookie\nyt-remote-session-name\n  * Duration\nsession\n  * Description\nThe yt-remote-session-name cookie is used by YouTube to store the user's video player preferences using embedded YouTube video.\n\n\n  * Cookie\nyt-remote-fast-check-period\n  * Duration\nsession\n  * Description\nThe yt-remote-fast-check-period cookie is used by YouTube to store the user's video player preferences for embedded YouTube videos.\n\n\n  * Cookie\nyt-remote-session-app\n  * Duration\nsession\n  * Description\nThe yt-remote-session-app cookie is used by YouTube to store user preferences and information about the interface of the embedded YouTube video player.\n\n\n  * Cookie\nyt-remote-cast-available\n  * Duration\nsession\n  * Description\nThe yt-remote-cast-available cookie is used to store the user's preferences regarding whether casting is available on their YouTube video player.\n\n\n  * Cookie\nyt-remote-cast-installed\n  * Duration\nsession\n  * Description\nThe yt-remote-cast-installed cookie is used to store the user's video player preferences using embedded YouTube video.\n\n\n  * Cookie\ncp_session\n  * Duration\n3 months\n  * Description\nCodepen sets this cookie for Help systems found in the website.\n\n\n  * Cookie\nloid\n  * Duration\n1 year 1 month 4 days\n  * Description\nThis cookie is set by the Reddit. The cookie enables the sharing of content from the website onto the social media platform.\n\n\nAnalytics\nAnalytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.\n  * Cookie\n__hstc\n  * Duration\n6 months\n  * Description\nHubspot set this main cookie for tracking visitors. It contains the domain, initial timestamp (first visit), last timestamp (last visit), current timestamp (this visit), and session number (increments for each subsequent session).\n\n\n  * Cookie\nhubspotutk\n  * Duration\n6 months\n  * Description\nHubSpot sets this cookie to keep track of the visitors to the website. This cookie is passed to HubSpot on form submission and used when deduplicating contacts.\n\n\n  * Cookie\n_ga\n  * Duration\n1 year 1 month 4 days\n  * Description\nGoogle Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors.\n\n\n  * Cookie\n_ga_*\n  * Duration\n1 year 1 month 4 days\n  * Description\nGoogle Analytics sets this cookie to store and count page views.\n\n\n  * Cookie\n__Host-psifi.analyticsTrace\n  * Duration\n6 hours\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\n__Host-psifi.analyticsTraceV2\n  * Duration\n6 hours\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\n_gh_sess\n  * Duration\nsession\n  * Description\nGitHub sets this cookie for temporary application and framework state between pages like what step the user is on in a multiple step form.\n\n\n  * Cookie\nYSC\n  * Duration\nsession\n  * Description\nYSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.\n\n\n  * Cookie\najs_anonymous_id\n  * Duration\n1 year\n  * Description\nThis cookie is set by Segment to count the number of people who visit a certain site by tracking if they have visited before.\n\n\n  * Cookie\nvuid\n  * Duration\n1 year 1 month 4 days\n  * Description\nVimeo installs this cookie to collect tracking information by setting a unique ID to embed videos on the website. \n\n\nPerformance\nPerformance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.\n  * Cookie\nAWSALB\n  * Duration\n7 days\n  * Description\nAWSALB is an application load balancer cookie set by Amazon Web Services to map the session to the target.\n\n\n  * Cookie\nacq\n  * Duration\npast\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nacq.sig\n  * Duration\npast\n  * Description\nDescription is currently not available.\n\n\n  * Cookie\nptc\n  * Duration\n2 years\n  * Description\nNo description available.\n\n\nAdvertisement\nAdvertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.\n  * Cookie\nmuc_ads\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to collect user behaviour and interaction data to optimize the website.\n\n\n  * Cookie\nguest_id_marketing\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to identify and track the website visitor.\n\n\n  * Cookie\nguest_id_ads\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to identify and track the website visitor.\n\n\n  * Cookie\npersonalization_id\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to integrate and share features for social media and also store information about how the user uses the website, for tracking and targeting.\n\n\n  * Cookie\nguest_id\n  * Duration\n1 year 1 month 4 days\n  * Description\nTwitter sets this cookie to identify and track the website visitor. It registers if a user is signed in to the Twitter platform and collects information about ad preferences.\n\n\n  * Cookie\nbcookie\n  * Duration\n1 year\n  * Description\nLinkedIn sets this cookie from LinkedIn share buttons and ad tags to recognize browser IDs.\n\n\n  * Cookie\n__Secure-ROLLOUT_TOKEN\n  * Duration\n6 months\n  * Description\nYouTube sets this cookie to manage feature rollout and experimentation. It helps Google control which new features or interface changes are shown to users as part of testing and staged rollouts, ensuring consistent experience for a given user during an experiment.\n\n\n  * Cookie\nyt.innertube::nextId\n  * Duration\nNever Expires\n  * Description\nYouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.\n\n\n  * Cookie\nyt.innertube::requests\n  * Duration\nNever Expires\n  * Description\nYouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.\n\n\n  * Cookie\nsession_tracker\n  * Duration\nsession\n  * Description\nThis cookie is set by the Reddit. This cookie is used to identify trusted web traffic. It also helps in adverstising on the website.\n\n\n  * Cookie\nedgebucket\n  * Duration\nsession\n  * Description\nReddit sets this cookie to save the information about a log-on Reddit user, for the purpose of advertisement recommendations and updating the content.\n\n\n  * Cookie\ndid\n  * Duration\n1 year\n  * Description\nArbor sets this cookie to show targeted ads to site visitors.This cookie expires after 2 months or 1 year.\n\n\nUncategorised\nOther uncategorised cookies are those that are being analysed and have not been classified into a category as yet.\nNo cookies to display.\nReject All Save My Preferences Accept All\nToggle Search[](https://towardsdatascience.com/)Toggle Mobile Navigation\n[](https://towardsdatascience.com/)\nPublish AI, ML & data-science insights to a global community of data professionals.\nSign in[Submit an Article](https://write.insightmediagroup.io)\n[Latest](https://towardsdatascience.com/latest/)[Editor's Picks](https://towardsdatascience.com/tag/editors-pick/)[Newsletter](https://towardsdatascience.com/tag/the-variable/)[ShipAI](https://towardsdatascience.com/shipai/)\n* * *\n[Write For TDS](https://towardsdatascience.com/submissions/)\n[LinkedIn](https://www.linkedin.com/company/towards-data-science/)[X](https://x.com/TDataScience)Toggle Search\n[Artificial Intelligence](https://towardsdatascience.com/category/artificial-intelligence/)\n# TimeGPT vs TiDE: Is Zero-Shot Inference the Future of Forecasting or Just Hype?\nFoundational models: A comprehensive comparison of TimeGPT and TiDE in time series forecasting\n[Luís Roque](https://towardsdatascience.com/author/luisroque/)\nMarch 14, 202413 min read\n_This post was co-authored with Rafael Guedes._\n## Introduction\nForecasting is one of the core domains of Artificial Intelligence (AI) in academic research and industrial applications. In fact, it is probably one of the most ubiquitous challenges we can find across all industries. Accurately predicting future sales volumes and market trends is essential for businesses to optimize their planning processes. This includes enhancing contribution margins, minimizing waste, ensuring adequate inventory levels, optimizing the supply chain, and improving decision-making overall.\nDeveloping a forecast model represents a complex and multifaceted challenge. It requires a deep understanding of State-Of-The-Art (SOTA) forecasting methodologies and the specific business domain to which they are applied. Furthermore, the forecast engine will act as a critical infrastructure within an organization, supporting a broad spectrum of processes across various departments. For instance:\nLearn this step by step with the interactive [AI Engineer](https://roadmap.sh/ai-engineer), [AI and Data Scientist](https://roadmap.sh/ai-data-scientist) and [Machine Learning](https://roadmap.sh/machine-learning) roadmaps.\n  * The **Marketing team** leverages the model to inform strategic decisions regarding investment allocations for upcoming periods, such as the next month or quarter.\n  * The **Procurement team** utilizes the model to make informed decisions about purchase quantities and timing from suppliers, optimizing inventory levels and reducing waste or shortages.\n  * The **Operations team** uses the forecasts to optimize the production lines. They can deploy resources and workforce to meet expected demand while minimizing operational costs.\n  * The **Finance team** relies on the model for budgeting purposes, using forecast data to project monthly financial requirements and allocate resources accordingly.\n  * The **Customer Service team** uses the forecast to anticipate customer inquiry volumes, allowing the team to right-size staffing levels while ensuring high-quality customer service and minimizing wait times.\n\n\nRecent advancements in forecasting have also been shaped by the successful development of foundational models across various domains, including text (e.g., ChatGPT), text-to-image (e.g., Midjourney), and text-to-speech (e.g., Eleven Labs). The wide adoption of these models has resulted in the introduction of models like TimeGPT [1], designed to generate predictions on previously unseen data through zero-shot inference. These models leverage the methodologies and architectures that resemble their predecessors in text, image, and speech. A general pre-trained model would constitute a paradigm shift in tackling forecasting tasks. It would make it more accessible to organizations, reduce the computation complexity, and make it more accurate overall.\nIn this article, we provide an in-depth explanation of the possible architecture behind TimeGPT. We also cover the main components that allow the model to perform zero-shot inference. Following this theoretical overview, we then apply TimeGPT to a specific use case and dataset. We cover the practical implementation details and conduct a thorough analysis of the model's performance. Finally, we compare the performance of TimeGPT with TiDE [2], an 'embarrassingly' simple MLP that beats Transformers in forecasting use cases.\n![Figure 1: TimeGPT \\(image by author with DALL-E\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1Om753WcPgkV53S0BTQDBEg.jpeg)\nFigure 1: TimeGPT (image by author with DALL-E)\nAs always, the code is available on our [GitHub](https://github.com/zaai-ai/lab).\n## TimeGPT\nTimeGPT [1] was the first foundation model for time series forecasting, characterized by its ability to generalize across diverse domains. It can produce precise forecasts on datasets beyond those used during its training phase. The field of research surrounding foundation models for time series forecasting has been experiencing significant growth recently. Notable recent contributions include \"MOMENT\" developed by researchers at Carnegie Mellon University (CMU) [3], \"TimesFM\" from Google [4], \"Lag-Llama,\" a collaborative effort between Morgan Stanley and ServiceNow [5], and \"Moirai\" from Salesforce [6]. We plan to cover other time series foundational models for time series forecasting in the future.\nTimeGPT leverages transfer learning to perform well in a zero-shot inference setup. It was trained with 100 billion data points from a large collection of publicly available datasets of various domains such as economics, demographics, healthcare, weather, IoT sensor data, energy, web traffic, sales, transport, and banking.\nThe extensive diversity of domains allows the model to capture complex patterns such as multiple seasonalities, cycles of different lengths, and evolving trends. Additionally, the datasets exhibit a range of noise levels, outliers, drift, and other characteristics. While some consist of clean data with regular patterns, others have unexpected events and behaviors where trends and patterns may fluctuate over time. These challenges provide many scenarios for the model to learn from, improving its robustness and generalization capabilities.\n![Figure 2: TimeGPT was trained on a collection of public datasets with different sizes and granularities to forecast unseen time series accurately without re-training \\(source\\).](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1ru6BmRvagdDpelMN-TmpBA.png)\nFigure 2: TimeGPT was trained on a collection of public datasets with different sizes and granularities to forecast unseen time series accurately without re-training ([source](https://arxiv.org/pdf/2310.03589.pdf)).\n## Architecture\nTimeGPT is a Transformer-based model specifically designed for time series forecasting, incorporating a self-attention mechanism within an encoder-decoder architecture. By leveraging the self-attention mechanism, it can dynamically weigh the significance of different points in the time series.\nThe model receives a window of historical values (_y_) and exogenous covariates (_x_) as input. The covariates may include additional time series data and/or binary variables that denote specific events, such as public holidays. These inputs are augmented with sequential information by integrating local positional embeddings. This allows the model to be aware of the temporal dependencies. While not explicitly stated by the authors, we believe all the inputs are concatenated after the positional encoding, producing the final input to feed the encoder.\n![Figure 3: Process of adding positional embeddings to the input data and concatenating all inputs in a final input vector \\(image by author\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1XU-R1iV9R-VSom_FK3Xxpw.png)\nFigure 3: Process of adding positional embeddings to the input data and concatenating all inputs in a final input vector (image by author)\nThe positional encodings are also not defined by the authors. We assume that they use the sine and cosine functions from the foundational transformer architecture paper [7]. These functions are characterized by varying frequencies but maintain the same dimensionality as the input data.\n![Equations 1: sine and cosine functions that generate positional embeddings where pos is the position, i is the dimension of the positional encoding, and _dmodel is the total dimension of the vector.](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1ti8IurpiJJ2EO4cpdowxug.png)\nEquations 1: sine and cosine functions that generate positional embeddings where _pos_ is the position, _i_ is the dimension of the positional encoding, and _d _model_ is the total dimension of the vector.\nOnce augmented with positional encodings, the input vector is introduced into the encoder. Within the encoder, a multi-head attention layer evaluates and assigns weights to the various elements within the input sequence, reflecting their relative importance. Subsequently, this representation is processed by a fully connected feed-forward network. It allows the generation of a representation that captures more complex relationships between the elements in the sequence. The output is then fed to the decoder part of the architecture.\n![Figure 4: The Encoder receives the vector resulting from the addition between the input and the positional encoding and generates a new vector to feed the decoder \\(image by author\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1-QNj8KMsJhwXECPPhL95Kw.png)\nFigure 4: The Encoder receives the vector resulting from the addition between the input and the positional encoding and generates a new vector to feed the decoder (image by author)\nIn addition to processing the encoder's output, the decoder operates in an auto-regressive process. It incorporates previously generated outputs before producing the forecasts of the subsequent time step (_i+1)_. It leverages the attention mechanism to capture the complex relationships between the hidden states produced by the encoder and the previously generated outputs. This approach enables the decoder to effectively synthesize the contextual and sequential information encapsulated in the encoder's representations with its own iterative predictions.\n![Figure 5: Decoder receives as input the output of the encoder and previous predictions position encoded \\(image by author\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1NU7-q18M0Dq2MvBoC8Af_A.png)\nFigure 5: Decoder receives as input the output of the encoder and previous predictions position encoded (image by author)\nFinally, the linear layer is responsible for mapping the decoder's output to a vector of values with the same length as the forecast horizon (_h_).\n![Figure 6: A linear layer receives the output of the decoder as input and produces the final forecast with the same dimension as the forecast horizon \\(image by author\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1FA3h3Uhv5GT5uHADRrMuog.png)\nFigure 6: A linear layer receives the output of the decoder as input and produces the final forecast with the same dimension as the forecast horizon (image by author)\nTimeGPT can generate a probabilistic distribution of potential outcomes, i.e., the estimation of forecast intervals. The authors relied on conformal prediction [8] based on historical errors to estimate the forecast intervals. Unlike traditional methods, conformal prediction does not require distributional assumptions, and it can be achieved by:\n  1. Creating _M_ training and calibration sets;\n  2. Forecasting each calibration set with the model;\n  3. For each forecast horizon _h_ , the absolute residual values between the model's predictions and the actual outcomes within the calibration set are calculated. These calculated residuals are called nonconformity scores.\n  4. We select a specific quantile from the distribution of nonconformity scores for each forecast horizon _h_. The chosen quantile determines the forecast interval's coverage level, with higher quantiles resulting in broader intervals.\n\n\nThe forecast intervals are given by the predicted value ± the final nonconformity score.\n![Figure 7: Conformal Prediction process \\(image by author\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1Po__QFqEgK18E5ng0UTTDg.png)\nFigure 7: Conformal Prediction process (image by author)\n## TimeGPT vs. TiDE: a comparison in a real use case\nIn this section, we will use TimeGPT to forecast sales using a real-world dataset from one of our clients. Subsequently, we compare the forecasting performance of TimeGPT with TiDE, using the same cutoff date for analysis.\nTiDE [2] is a novel multivariate time-series model that can use static covariates (e.g., brand of a product) and known or unknown dynamic covariates in the forecast horizon (e.g., price of a product) to generate an accurate forecast. Unlike the complex architecture of Transformers, TiDE is based on a simple Encoder-Decoder architecture with a Residual connection where:\n  * The **Encoder** is responsible for mapping the past target values and the covariates of a time series into a dense representation of features. First, the f**eature projection** reduces the dimensionality of the dynamic covariates. Then, the **Dense Encoder** receives the output of the Feature Projection concatenated with static covariates and the past values to map them into a single embedding representation.\n  * The **Decoder** receives the embedding representation and converts it into future predictions. The **Dense Decoder** maps the embedding representation into a vector per time-step in the horizon. Afterward, the **Temporal Decoder** combines the output of the Dense Decoder with the projected features of that time step to produce the predictions.\n  * Finally, the **Residual Connection** linearly maps the look-back to a vector with the size of the horizon, which is added to the output of the Temporal Decoder to produce the final predictions.\n\n\n![Figure 8: TiDE architecture \\(source\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1s5LFMO_ukVTiEUy2PBZxrg.png)\nFigure 8: TiDE architecture ([source](https://arxiv.org/pdf/2304.08424.pdf))\nThe dataset contains 195 unique time series, each detailing weekly sales data specifically for the United States market. In addition to historical sales data, the dataset has information on two types of marketing events. We incorporate US public holidays and binary seasonal features to augment the dataset, in this case, week and month identifiers. The forecasting horizon is 16 weeks, i.e., we want to predict 16 weeks into the future.\nWe start by importing the libraries:\njavascript\n\n```\nimport matplotlib.pyplot as plt\nimport os\nimport pandas as pd\nimport utils\n\nfrom nixtlats import TimeGPT\nfrom nixtlats.date_features import CountryHolidays\nfrom dotenv import load_dotenv\nfrom sklearn.preprocessing import MinMaxScaler, OrdinalEncoder\n\nload_dotenv()\n```\n\nThen, we initiate the TimeGPT class by providing a TimeGPT token. You can request one from the Nixtla website.\ncsharp\n\n```\ntimegpt = TimeGPT(token = os.environ.get(\"TIMEGPT_KEY\"))\ntimegpt.validate_token()\n```\n\n> INFO:nixtlats.timegpt:Happy Forecasting! :), If you have questions or need support, please email ops@nixtla.io\nWhen preparing to load your dataset after validating the authentication token, ensure the following:\n  * The target variable should be numeric and without missing values.\n  * Ensure no gaps exist in the date sequence from the start to the end date.\n  * The date column must be in a format recognizable by Pandas.\n  * Per the documentation, data normalization is handled internally. Therefore, you can skip that step.\n  * For forecasting multiple time series, include a column to uniquely identify each series, which will be used as an argument in the forecasting function.\n  * Exogenous features require a separate dataset for the forecast horizon.\n\n\nini\n\n```\n# read data frame and parse dates as datetime\ndf = pd.read_csv('data/data.csv', parse_dates=['delivery_week'])\n```\n\nAs discussed, to augment the dataset, we add binary seasonal features for week and month as follows:\nbash\n\n```\n# add week and month to df\ndf['week'] = df['delivery_week'].dt.isocalendar().week\ndf['month'] = df['delivery_week'].dt.month\n\n# one hot encode week and month\ndf = pd.get_dummies(df, columns=['week', 'month'], dtype=int)\n```\n\nNow, we can truncate our dataset to be used by TimeGPT for forecasting. Additionally, we will create a holdout set with the actual sales data within the forecast horizon and the corresponding exogenous features for the same period.\nbash\n\n```\n# Truncate data frame \nforecast_df = df[df['delivery_week'] < \"2023-10-16\"]\n\n# Let's use the last x weeks of actuals for the holdout set \nholdout_df = df[(df['delivery_week'] >= \"2023-10-16\") &amp; (df['delivery_week'] <= \"2024-02-05\")]\n```\n\nAfter splitting the data, we can proceed to feed the training and holdout datasets into the `forecast()` function. We need to set the following parameters:\n  * `df` - data frame with historical data\n  * `time_col` - column with temporal information\n  * `target_col` - column with historical data\n  * `X_df` - data frame with exogenous features for the forecast horizon\n  * `date_features` - allows the specification of new exogenous features like the public holidays in the US\n  * `h` - define the forecast horizon\n  * `level` - forecast intervals (80% confidence)\n  * `freq` - frequency of the data, in our case, it is weekly on Monday\n  * `id_col` - column that identifies each time series in a multivariate scenario\n  * `model` - TimeGPT has two models one for short term and another for long term. The long-term should be used when there is more than one seasonal period in the forecast horizon.\n  * `add_history` - return the fitted values in historical data\n\n\nbash\n\n```\n# create list with seasonal exogenous features\nEXOGENOUS_FAETURES = [x for x in df.columns if ('week_' in x) | ('month_' in x)]\n\ntimegpt_fcst_ex_vars_df = timegpt.forecast(\n    df=forecast_df[['unique_id', 'delivery_week', 'target', 'marketing_events_1', 'marketing_events_2']+EXOGENOUS_FAETURES],\n    time_col='delivery_week',\n    target_col='target',\n    X_df=holdout_df[['unique_id', 'delivery_week', 'marketing_events_1', 'marketing_events_2']+EXOGENOUS_FAETURES],\n    date_features=[CountryHolidays(['US'])],\n    h=17,\n    level=[80],\n    freq='W-MON',\n    id_col='unique_id',\n    model='timegpt-1',\n    add_history=True,\n    )\n```\n\nThe forecast takes just a few minutes to run. It then returns a data frame with the fitted values for historical data and the predictions for the forecast horizon. It also returns the importance of the exogenous covariates in the forecast.\ncsharp\n\n```\ntimegpt.weights_x.head(10).sort_values(by='weights').plot.barh(x='features', y='weights')\nplt.title('Feature Importance - top 10')\nplt.show()\n```\n\nIn our case, we extracted the ten most important covariates, which shows that the marketing events have the highest importance. Conversely, the seasonal and holidays covariates have a residual importance.\n![Figure 9: TimeGPT exogenous covariates importance \\(image made by the author\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1PZ6GrGO1yCPpCmYY3ZflMw.png)\nFigure 9: TimeGPT exogenous covariates importance (image made by the author)\nSince we set `add_history=True`, we can plot the fitted values and the predictions. We selected the six series with the highest volume in the holdout set. They are more relevant for the business and likely easier to forecast with more stable patterns.\npython\n\n```\n# get series ordered by volume in a descending way\nseries = holdout_df.groupby('unique_id')['target'].sum().reset_index().sort_values(by='target', ascending=False)['unique_id'].tolist()\n\ntimegpt.plot(\n    forecast_df[['unique_id', 'delivery_week', 'target']], \n    timegpt_fcst_ex_vars_df,\n    time_col='delivery_week',\n    target_col='target',\n    unique_ids=series[:6],\n    level=[80], \n)\n```\n\n![Figure 10: TimeGPT fitted values and forecast \\(image by author\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1ONNejX5fSvcLPZRmRhw0Cw.png)\nFigure 10: TimeGPT fitted values and forecast (image by author)\nFigure 10 shows that while the fitted values align well with the actual values, the forecasts are inconsistent. They show uniform patterns across most series except in one case (we can find it in the top right corner). Additionally, all predictions show consecutive unexpected spikes, which we did not expect to see.\nHaving obtained the forecast from TimeGPT, we can now load the forecast generated by TiDE and compute forecasting performance metrics for comparison. We have used the Mean Absolute Percentage Error (MAPE) as our comparison metric to maintain confidentiality and prevent the disclosure of actual sales volumes.\npython\n\n```\n# load the forecast from TiDE and TimeGPT\ntide_model_df = pd.read_csv('data/tide.csv', parse_dates=['delivery_week'])\ntimegpt_fcst_ex_vars_df = pd.read_csv('data/timegpt.csv', parse_dates=['delivery_week'])\n\n# merge data frames with TiDE forecast and actuals\nmodel_eval_df = pd.merge(holdout_df[['unique_id', 'delivery_week', 'target']], tide_model_df[['unique_id', 'delivery_week', 'forecast']], on=['unique_id', 'delivery_week'], how='inner')\n\n# merge data frames with TimeGPT forecast and actuals\nmodel_eval_df = pd.merge(model_eval_df, timegpt_fcst_ex_vars_df[['unique_id', 'delivery_week', 'TimeGPT']], on=['unique_id', 'delivery_week'], how='inner')\n\nutils.plot_model_comparison(model_eval_df)\n```\n\n![Figure 11: MAPE comparison between TiDE and TimeGPT \\(image by author\\)](https://assets.insightmediagroup.io/media/wp-content/uploads/2024/03/1RwBNuv3lvIt2DCHsBkYt-A.png)\nFigure 11: MAPE comparison between TiDE and TimeGPT (image by author)\nAs shown in Figure 11, TiDE has a lower average MAPE when compared to TimeGPT across the 195-time series for 15 out of 16 weeks. Although both models have access to the same information, the zero-shot inference from TimeGPT did not manage to beat our fine-tuned model.\n## Conclusion\nThe significance of forecasting cannot be overstated in today's competitive landscape. Effective forecasting methods are key for organizations striving for operational excellence, enabling them to plan and manage their operations more efficiently.\nIn this article, we explored one of the most recent innovations in time series forecasting - the development of foundation models. These models aim to democratize access to sophisticated algorithms for organizations lacking the specialized expertise required to develop SOTA models in-house. While this initiative is promising, our analysis indicates that it still falls short of delivering accurate forecasts. Specifically, TiDE significantly outperformed TimeGPT in a zero-shot inference scenario.\nNevertheless, it is encouraging to witness the efforts of AI companies to push the boundaries of forecasting. While other domains, such as computer vision and NLP, have been gaining increased attention, the significance of forecasting for organizations should not be overlooked.\n## About me\nSerial entrepreneur and leader in the AI space. I develop AI products for businesses and invest in AI-focused startups.\n[Founder @ ZAAI](http://zaai.ai/) | [LinkedIn](https://www.linkedin.com/in/luisbrasroque/) | [X/Twitter](https://x.com/luisbrasroque)\n## References\n[1] Garza, A., & Mergenthaler-Canseco, M. (2023). _TimeGPT-1_. Retrieved from arXiv:2310.03589.\n[2] Abhimanyu Das, Weihao Kong, Andrew Leach, Shaan Mathur, Rajat Sen, Rose Yu. (2023) Long-term Forecasting with TiDE: Time-series Dense Encoder. arXiv:2304.08424.\n[3] Goswami, M., Szafer, K., Choudhry, A., Cai, Y., Li, S., & Dubrawski, A. (2024). _MOMENT: A Family of Open Time-series Foundation Models_. Retrieved from arXiv:2402.03885 (cs.LG).\n[4] Das, A., Kong, W., Sen, R., & Zhou, Y. (2024). _A decoder-only foundation model for time-series forecasting_. Retrieved from arXiv:2310.10688 ([cs.CL](http://cs.CL)).\n[5] Rasul, K., Ashok, A., Williams, A. R., Ghonia, H., Bhagwatkar, R., Khorasani, A., Darvishi Bayazi, M. J., Adamopoulos, G., Riachi, R., Hassen, N., Biloš, M., Garg, S., Schneider, A., Chapados, N., Drouin, A., Zantedeschi, V., Nevmyvaka, Y., & Rish, I. (2024). _Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting_. Retrieved from arXiv:2310.08278 (cs.LG).\n[6] Woo, G., Liu, C., Kumar, A., Xiong, C., Savarese, S., & Sahoo, D. (2024). _Unified Training of Universal Time Series Forecasting Transformers_. Retrieved from arXiv:2402.02592 (cs.LG).\n[7] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). _Attention Is All You Need_. Retrieved from arXiv:1706.03762.\n[8] Stankeviciute, K., Alaa, A. M., & van der Schaar, M. (2021). _Conformal time-series forecasting_. In _Advances in Neural Information Processing Systems_ (Vol. 34, pp. 6216–6228).\n## Register Now to Continue Reading\n### Unlock Towards Data Science with a Free Account\nAll articles on Towards Data Science are available to registered users. Create a free account today to access this article and thousands more.\nRegister for freeSign in to your account\n* * *\n![](https://assets.insightmediagroup.io/media/1787657097530_bymdsj.jpeg)\nWritten By\n## [Luís Roque](https://towardsdatascience.com/author/luisroque/)\n[See all from Luís Roque](https://towardsdatascience.com/author/luisroque/)\n[Artificial Intelligence](https://towardsdatascience.com/tag/artificial-intelligence/)[Data Science](https://towardsdatascience.com/tag/data-science/)[Machine Learning](https://towardsdatascience.com/tag/machine-learning/)[Python](https://towardsdatascience.com/tag/python/)[Time Series Forecasting](https://towardsdatascience.com/tag/time-series-forecasting/)\nShare This Article\n  * [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Ftowardsdatascience.com%2Ftimegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76%2F&title=TimeGPT%20vs%20TiDE%3A%20Is%20Zero-Shot%20Inference%20the%20Future%20of%20Forecasting%20or%20Just%20Hype%3F)\n  * [](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Ftowardsdatascience.com%2Ftimegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76%2F&title=TimeGPT%20vs%20TiDE%3A%20Is%20Zero-Shot%20Inference%20the%20Future%20of%20Forecasting%20or%20Just%20Hype%3F)\n  * [](https://x.com/share?url=https%3A%2F%2Ftowardsdatascience.com%2Ftimegpt-vs-tide-is-zero-shot-inference-the-future-of-forecasting-or-just-hype-9063bdbe0b76%2F&text=TimeGPT%20vs%20TiDE%3A%20Is%20Zero-Shot%20Inference%20the%20Future%20of%20Forecasting%20or%20Just%20Hype%3F)\n\n\nTowards Data Science is a community publication. Submit your insights to reach our global audience and earn through the TDS Author Payment Program.\n[Write for TDS](https://towardsdatascience.com/submissions/)\n## Related Articles\n  * [![](https://assets.insightmediagroup.io/media/wp-content/uploads/2021/11/0PhqJppWjrAq7K1Fv-scaled.jpg)](https://towardsdatascience.com/predicting-soccer-league-tables-is-historical-data-the-way-to-go-840e4272f1c4/)\n## [Predicting Soccer League Tables - is Historical Data the way to go?](https://towardsdatascience.com/predicting-soccer-league-tables-is-historical-data-the-way-to-go-840e4272f1c4/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nAnalyzing the Italian Soccer League (The Serie A as it's known) reveals a lot about how sport changes quickly\n[Azaan Barlas](https://towardsdatascience.com/author/azaanbarlas/)\nNovember 17, 20218 min read\n  * [![](https://assets.insightmediagroup.io/media/wp-content/uploads/2019/09/0bOOFpDZUImJlxxVP.jpg)](https://towardsdatascience.com/data-management-strategy-d3ce6db599c1/)\n## [Data Management Strategy](https://towardsdatascience.com/data-management-strategy-d3ce6db599c1/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nEverything you wanted to know about it and its main actors\n[Victor Roman](https://towardsdatascience.com/author/rromanss23/)\nSeptember 27, 20197 min read\n  * [![](https://assets.insightmediagroup.io/media/wp-content/uploads/2021/07/1qk09eikKngIG3nHs9DMXUQ.jpeg)](https://towardsdatascience.com/conquer-the-python-coding-round-in-data-science-interviews-5e27c4513be3/)\n## [Conquer the Python Coding Round in Data Science Interviews](https://towardsdatascience.com/conquer-the-python-coding-round-in-data-science-interviews-5e27c4513be3/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nMy experience from interviewing as a Data Scientist in 2021 in Bangalore, India.\n[Divya Choudhary](https://towardsdatascience.com/author/learnwithdivya/)\nJuly 5, 20215 min read\n  * [![](https://assets.insightmediagroup.io/media/wp-content/uploads/2023/04/0rBu70-VDBtttRCzP-scaled.jpg)](https://towardsdatascience.com/a-sustainable-supply-chain-template-with-geospatial-calculations-in-python-f99a20a43df4/)\n## [A Sustainable Supply Chain Template with Geospatial Calculations in Python](https://towardsdatascience.com/a-sustainable-supply-chain-template-with-geospatial-calculations-in-python-f99a20a43df4/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nA supply chain network footprint should include greenhouse gas calculations for both transportation and distribution centers\n[Sabi Horvat](https://towardsdatascience.com/author/sabolch-horvat/)\nApril 25, 20235 min read\n  * [![](https://assets.insightmediagroup.io/media/wp-content/uploads/2020/01/1Dml0SXUjv4nxefbyW4fUWg.png)](https://towardsdatascience.com/data-cleaning-and-analysis-with-a-bonus-story-36b3ae39564c/)\n## [Data Cleaning and Analysis with a Bonus Story](https://towardsdatascience.com/data-cleaning-and-analysis-with-a-bonus-story-36b3ae39564c/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nPeople are the most critical part of businesses. People create value for people and sell it to people. Therefore, changes on people and...\n[Soner Yıldırım](https://towardsdatascience.com/author/sonery/)\nJanuary 5, 202012 min read\n  * [![](https://assets.insightmediagroup.io/media/wp-content/uploads/2022/08/1eTt4AjMkfJhrcYjiTmHwwA-scaled.jpeg)](https://towardsdatascience.com/8-tips-for-creating-data-visualizations-in-python-using-bokeh-d7a01701503d/)\n## [8 Tips for Creating Data Visualizations in Python using Bokeh](https://towardsdatascience.com/8-tips-for-creating-data-visualizations-in-python-using-bokeh-d7a01701503d/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nQuick tips and examples to create data visualizations using the Bokeh library\n[Payal Patel](https://towardsdatascience.com/author/payal-patel/)\nDecember 16, 202211 min read\n  * [![](https://assets.insightmediagroup.io/media/wp-content/uploads/2022/03/1wGqRgZuz3vyCrmwo4yUP-A-scaled.jpeg)](https://towardsdatascience.com/pandas-remove-unwanted-parts-from-strings-92ac881e60a2/)\n## [How To Remove Unwanted Parts From Strings in Pandas](https://towardsdatascience.com/pandas-remove-unwanted-parts-from-strings-92ac881e60a2/)\n[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)\nRemoving unwanted sub-strings from a column in Pandas\n[Giorgos Myrianthous](https://towardsdatascience.com/author/gmyrianthous/)\nMarch 29, 20225 min read\n  * [![](https://assets.insightmediagroup.io/media/wp-content/uploads/2021/10/0cxB2tjdFjpXSK6O4-scaled.jpg)](https://towardsdatascience.com/data-platforms-liberate-data-from-your-legacy-systems-669b643e3124/)\n## [Data Platforms - Liberate Data From Your Legacy Systems](https://towardsdatascience.com/data-platforms-liberate-data-from-your-legacy-systems-669b643e3124/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nThe potential of data analytics is often held back by ancient and diverse legacy system scattered across the company. However, data and...\n[Wouter van Heeswijk, PhD](https://towardsdatascience.com/author/wvheeswijk/)\nOctober 10, 20217 min read\n  * [![](https://assets.insightmediagroup.io/media/wp-content/uploads/2020/10/0zJGZybYp8xUopyzR.png)](https://towardsdatascience.com/data-sources-are-getting-standardized-can-analytics-data-science-and-ml-keep-up-8185a6c4ac4a/)\n## [Data sources are getting standardized; can analytics, data science, and ML keep up?](https://towardsdatascience.com/data-sources-are-getting-standardized-can-analytics-data-science-and-ml-keep-up-8185a6c4ac4a/)\n[Data Science](https://towardsdatascience.com/category/data-science/)\nA stance on the opportunity for out-of-the-box insight for standard schemas\n[Charles Zhu](https://towardsdatascience.com/author/charleszhu_4848/)\nOctober 23, 202011 min read\n\n\n  * [YouTube](https://www.youtube.com/c/TowardsDataScience)\n  * [X](https://x.com/TDataScience)\n  * [LinkedIn](https://www.linkedin.com/company/towards-data-science/)\n  * [Threads](https://www.threads.net/@towardsdatascience)\n  * [Bluesky](https://bsky.app/profile/towardsdatascience.com)\n\n\n[](https://towardsdatascience.com/)\nYour home for data science and AI. The world's leading publication for data science, data analytics, data engineering, machine learning, and artificial intelligence professionals.\nSubscribe to Our Newsletter[Write For TDS](https://towardsdatascience.com/submissions/)•[About](https://towardsdatascience.com/about-towards-data-science-d691af11cc2f/)•[Advertise](https://contact.towardsdatascience.com/advertise-with-towards-data-science)•[Privacy Policy](https://towardsdatascience.com/privacy-policy/)•[Terms of Use](https://towardsdatascience.com/website-terms-of-use/)\n© Insight Media Group, LLC 2026•[The New Stack](https://thenewstack.io)•[roadmap.sh](https://roadmap.sh)•[Creator Network](https://insightmediagroup.io/creator-network)\n",
  "body_base_path": "attachments/650517ad2b7b/pages/",
  "body_markdown_path": "attachments/650517ad2b7b/pages/archived-body.md",
  "local_html": "attachments/650517ad2b7b/pages/archived-body.html",
  "body_source": "prior_capture"
}