Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Model callouts and descriptions #359

Merged
merged 6 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion nbs/docs/getting-started/5_faq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,25 @@
"## Features and Capabilities"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<details>\n",
" <summary>What is the input to TimeGPT?</summary>\n",
"\n",
"`TimeGPT` accepts `pandas` dataframes in [long format](https://www.theanalysisfactor.com/wide-and-long-data/#comments) with the following necessary columns: \n",
"\n",
"- `ds` (timestamp): timestamp in format `YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`. \n",
"- `y` (numeric): The target variable to forecast. \n",
"\n",
"(Optionally, you can also pass a DataFrame without the `ds` column as long as it has DatetimeIndex)\n",
"\n",
"`TimeGPT` also works with [distributed dataframes](https://docs.nixtla.io/docs/tutorials-computing_at_scale) like `dask`, `spark` and `ray`. \n",
"\n",
"</details>"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -295,7 +314,7 @@
"<details>\n",
" <summary>Does TimeGPT support polars?</summary>\n",
"\n",
"As of now, `TimeGPT` supports only pandas DataFrames and does not offer support for polars. \n",
"As of now, `TimeGPT` does not offer support for polars. \n",
"\n",
"</details>"
]
Expand Down
22 changes: 13 additions & 9 deletions nbs/docs/tutorials/050_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@
"id": "6de758ee-a0d2-4b3f-acff-eed419dd17c5",
"metadata": {},
"source": [
"# Training"
]
},
{
"cell_type": "markdown",
"id": "5d267032-535b-4b7b-b7d3-d2db8f673af6",
"metadata": {},
"source": [
"This section offers tutorials related to training a model."
"# Training\n",
"\n",
"This section offers tutorials related to training `TimeGPT` under specific conditions.\n",
"\n",
"### What You Will Learn\n",
"\n",
"1. **[Long Horizon Forecasting](https://docs.nixtla.io/docs/tutorials-long_horizon_forecasting)**\n",
"\n",
" - Discover how make predictions beyond two seasonal periods or even further into the future, using `TimeGPT`'s specialized model for long horizon forecasting.\n",
"\n",
"2. **[Multiple Series Forecasting](https://docs.nixtla.io/docs/tutorials-multiple_series_forecasting)**\n",
"\n",
" - Learn how to use `TimeGPT` to forecast multiple time series simultaneously."
]
}
],
Expand Down
12 changes: 10 additions & 2 deletions nbs/docs/tutorials/080_validation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@
"id": "5d267032-535b-4b7b-b7d3-d2db8f673af6",
"metadata": {},
"source": [
"One of the primary challenges in time series forecasting is the inherent uncertainty and variability over time, making it crucial to validate the accuracy and reliability of the models employed. \n",
"One of the primary challenges in time series forecasting is the inherent uncertainty and variability over time, making it crucial to validate the accuracy and reliability of the models employed. `TimeGPT` offers the possibility for cross-validation and historical forecasts to help you validate your predictions.\n",
"\n",
"TimeGPT offers the possibility for cross-validation and historical forecasts to help you validate your predictions."
"### What You Will Learn\n",
"\n",
"1. **[Cross-Validation](https://docs.nixtla.io/docs/tutorials-cross_validation)**\n",
"\n",
" - Learn how to perform time series cross-validation across different continuous windows of your data. \n",
"\n",
"2. **[Historical Forecasts](https://docs.nixtla.io/docs/tutorials-historical_forecast)**\n",
"\n",
" - Generate in-sample forecasts to validate how `TimeGPT` would have performed in the past, providing insights into the model's accuracy. \n"
]
}
],
Expand Down
28 changes: 28 additions & 0 deletions nbs/docs/tutorials/09_historical_forecast.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@
")"
]
},
{
"cell_type": "markdown",
"id": "dce721eb",
"metadata": {},
"source": [
"> 👍 Use an Azure AI endpoint\n",
">\n",
"> To use an Azure AI endpoint, set the `base_url` argument:\n",
">\n",
"> `nixtla_client = NixtlaClient(base_url=\"you azure ai endpoint\", api_key=\"your api_key\")`"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -292,6 +304,22 @@
")"
]
},
{
"cell_type": "markdown",
"id": "6933cbb0",
"metadata": {},
"source": [
"> 📘 Available models in Azure AI\n",
">\n",
"> If you are using an Azure AI endpoint, please be sure to set `model=\"azureai\"`:\n",
">\n",
"> `nixtla_client.forecast(..., model=\"azureai\")`\n",
"> \n",
"> For the public API, we support two models: `timegpt-1` and `timegpt-1-long-horizon`. \n",
"> \n",
"> By default, `timegpt-1` is used. Please see [this tutorial](https://docs.nixtla.io/docs/tutorials-long_horizon_forecasting) on how and when to use `timegpt-1-long-horizon`.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
22 changes: 12 additions & 10 deletions nbs/docs/tutorials/100_uncertainty_quantification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
"id": "6de758ee-a0d2-4b3f-acff-eed419dd17c5",
"metadata": {},
"source": [
"# Uncertainty quantification"
]
},
{
"cell_type": "markdown",
"id": "5d267032-535b-4b7b-b7d3-d2db8f673af6",
"metadata": {},
"source": [
"In forecasting, we are often interested in a distribution of predictions rather than only a point prediction, because we want to have a notion of the uncertainty around the forecast.\n",
"# Uncertainty quantification\n",
"\n",
"In forecasting, it is essential to consider the full distribution of predictions rather than only a point prediction. This approach allows for a better understanding of the uncertainty surrounding the forecast. `TimeGPT` supports uncertainty quantification through quantile forecasts and prediction intervals.\n",
"\n",
"### What You Will Learn\n",
"\n",
"1. **[Quantile Forecasts](https://docs.nixtla.io/docs/tutorials-quantile_forecasts)**\n",
"\n",
" - Learn how to compute specific quantiles of the forecast distribution using `TimeGPT`. \n",
"\n",
"2. **[Prediction Intervals](https://docs.nixtla.io/docs/tutorials-prediction_intervals)**\n",
"\n",
"TimeGPT offers the possibility to quantify uncertainty using quantile forecasts and prediction intervals."
" - Learn how to generate prediction intervals with `TimeGPT`, which give you a range of values that the forecast can take with a given probability. \n"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@
")"
]
},
{
"cell_type": "markdown",
"id": "1e0c97c2",
"metadata": {},
"source": [
"> 👍 Use an Azure AI endpoint\n",
">\n",
"> To use an Azure AI endpoint, set the `base_url` argument:\n",
">\n",
"> `nixtla_client = NixtlaClient(base_url=\"you azure ai endpoint\", api_key=\"your api_key\")`"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -404,6 +416,22 @@
"timegpt_quantile_fcst_df.head()"
]
},
{
"cell_type": "markdown",
"id": "6367adc2",
"metadata": {},
"source": [
"> 📘 Available models in Azure AI\n",
">\n",
"> If you are using an Azure AI endpoint, please be sure to set `model=\"azureai\"`:\n",
">\n",
"> `nixtla_client.forecast(..., model=\"azureai\")`\n",
"> \n",
"> For the public API, we support two models: `timegpt-1` and `timegpt-1-long-horizon`. \n",
"> \n",
"> By default, `timegpt-1` is used. Please see [this tutorial](https://docs.nixtla.io/docs/tutorials-long_horizon_forecasting) on how and when to use `timegpt-1-long-horizon`."
]
},
{
"cell_type": "markdown",
"id": "f75f9fcc-24a5-44b5-b19d-8875360d7af3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@
")"
]
},
{
"cell_type": "markdown",
"id": "4ec82f80",
"metadata": {},
"source": [
"> 👍 Use an Azure AI endpoint\n",
">\n",
"> To use an Azure AI endpoint, set the `base_url` argument:\n",
">\n",
"> `nixtla_client = NixtlaClient(base_url=\"you azure ai endpoint\", api_key=\"your api_key\")`"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -377,6 +389,22 @@
"timegpt_fcst_pred_int_df.head()"
]
},
{
"cell_type": "markdown",
"id": "e7cefb13",
"metadata": {},
"source": [
"> 📘 Available models in Azure AI\n",
">\n",
"> If you are using an Azure AI endpoint, please be sure to set `model=\"azureai\"`:\n",
">\n",
"> `nixtla_client.forecast(..., model=\"azureai\")`\n",
"> \n",
"> For the public API, we support two models: `timegpt-1` and `timegpt-1-long-horizon`. \n",
"> \n",
"> By default, `timegpt-1` is used. Please see [this tutorial](https://docs.nixtla.io/docs/tutorials-long_horizon_forecasting) on how and when to use `timegpt-1-long-horizon`."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
22 changes: 21 additions & 1 deletion nbs/docs/tutorials/120_special_topics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,27 @@
"id": "5d267032-535b-4b7b-b7d3-d2db8f673af6",
"metadata": {},
"source": [
"Here you can find tutorials for dealing with special topics during forecasting."
"`TimeGPT` is a robust foundation model for time series forecasting, with advanced capabilities such as hierarchical and bounded forecasts. To fully leverage the power of `TimeGPT`, there are specific situations that require special consideration, such as dealing with irregular timestamps or handling datasets with missing values.\n",
"\n",
"In this section, we will cover these special topics.\n",
"\n",
"### What You Will Learn\n",
"\n",
"1. **[Irregular Timestamps](https://docs.nixtla.io/docs/tutorials-irregular_timestamps)**\n",
"\n",
" - Learn how to deal with irregular timestamps for correct usage of `TimeGPT`.\n",
"\n",
"2. **[Bounded Forecasts](https://docs.nixtla.io/docs/tutorials-bounded_forecasts)**\n",
"\n",
" - Explore `TimeGPT`'s capability to make forecasts within a specified range, ideal for applications where outcomes are bounded.\n",
"\n",
"3. **[Hierarchical Forecasts](https://docs.nixtla.io/docs/tutorials-hierarchical_forecasting)**\n",
"\n",
" - Understand how to use `TimeGPT` to make coherent predictions at various levels of aggregation.\n",
"\n",
"4. **[Missing Values](https://docs.nixtla.io/docs/tutorials-missing_values)**\n",
"\n",
" - Learn how to address missing values within your time series data effectively using `TimeGPT`."
]
}
],
Expand Down
28 changes: 28 additions & 0 deletions nbs/docs/tutorials/12_irregular_timestamps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,18 @@
")"
]
},
{
"cell_type": "markdown",
"id": "d3e09434",
"metadata": {},
"source": [
"> 👍 Use an Azure AI endpoint\n",
">\n",
"> To use an Azure AI endpoint, set the `base_url` argument:\n",
">\n",
"> `nixtla_client = NixtlaClient(base_url=\"you azure ai endpoint\", api_key=\"your api_key\")`"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -454,6 +466,22 @@
")"
]
},
{
"cell_type": "markdown",
"id": "09f50f5b",
"metadata": {},
"source": [
"> 📘 Available models in Azure AI\n",
">\n",
"> If you are using an Azure AI endpoint, please be sure to set `model=\"azureai\"`:\n",
">\n",
"> `nixtla_client.forecast(..., model=\"azureai\")`\n",
"> \n",
"> For the public API, we support two models: `timegpt-1` and `timegpt-1-long-horizon`. \n",
"> \n",
"> By default, `timegpt-1` is used. Please see [this tutorial](https://docs.nixtla.io/docs/tutorials-long_horizon_forecasting) on how and when to use `timegpt-1-long-horizon`."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
28 changes: 28 additions & 0 deletions nbs/docs/tutorials/13_bounded_forecasts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,18 @@
")"
]
},
{
"cell_type": "markdown",
"id": "a9c7b28a",
"metadata": {},
"source": [
"> 👍 Use an Azure AI endpoint\n",
">\n",
"> To use an Azure AI endpoint, set the `base_url` argument:\n",
">\n",
"> `nixtla_client = NixtlaClient(base_url=\"you azure ai endpoint\", api_key=\"your api_key\")`"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -393,6 +405,22 @@
"timegpt_fcst_with_transform = nixtla_client.forecast(df=df_transformed, h=10, freq='Y', level=[80, 90, 99.5])"
]
},
{
"cell_type": "markdown",
"id": "b6067300",
"metadata": {},
"source": [
"> 📘 Available models in Azure AI\n",
">\n",
"> If you are using an Azure AI endpoint, please be sure to set `model=\"azureai\"`:\n",
">\n",
"> `nixtla_client.forecast(..., model=\"azureai\")`\n",
"> \n",
"> For the public API, we support two models: `timegpt-1` and `timegpt-1-long-horizon`. \n",
"> \n",
"> By default, `timegpt-1` is used. Please see [this tutorial](https://docs.nixtla.io/docs/tutorials-long_horizon_forecasting) on how and when to use `timegpt-1-long-horizon`."
]
},
{
"cell_type": "markdown",
"id": "967836fa",
Expand Down
28 changes: 28 additions & 0 deletions nbs/docs/tutorials/14_hierarchical_forecasting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,18 @@
")"
]
},
{
"cell_type": "markdown",
"id": "aacbea74",
"metadata": {},
"source": [
"> 👍 Use an Azure AI endpoint\n",
">\n",
"> To use an Azure AI endpoint, set the `base_url` argument:\n",
">\n",
"> `nixtla_client = NixtlaClient(base_url=\"you azure ai endpoint\", api_key=\"your api_key\")`"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -572,6 +584,22 @@
"timegpt_fcst = nixtla_client.forecast(df=Y_train_df, h=8, freq='QS', add_history=True)"
]
},
{
"cell_type": "markdown",
"id": "1f0db1ab",
"metadata": {},
"source": [
"> 📘 Available models in Azure AI\n",
">\n",
"> If you are using an Azure AI endpoint, please be sure to set `model=\"azureai\"`:\n",
">\n",
"> `nixtla_client.forecast(..., model=\"azureai\")`\n",
"> \n",
"> For the public API, we support two models: `timegpt-1` and `timegpt-1-long-horizon`. \n",
"> \n",
"> By default, `timegpt-1` is used. Please see [this tutorial](https://docs.nixtla.io/docs/tutorials-long_horizon_forecasting) on how and when to use `timegpt-1-long-horizon`."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
Loading
Loading