capabilities-forecast-forecast.mdx 5.96 KB
Newer Older
bailuo's avatar
readme  
bailuo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
---
title: "Forecast"
description: "Advanced zero-shot forecasting capabilities for time series data"
icon: "chart-line"
---

<Info>
  TimeGPT offers advanced zero-shot forecasting capabilities for a wide range of
  time series domains, thanks to its large-scale and diverse pretraining.
</Info>

<AccordionGroup>
  <Accordion title="Overview">
    This section provides an overview of forecasting features available in TimeGPT. You can leverage TimeGPT for:

    - Zero-shot forecasting
    - Forecasting with exogenous variables
    - Manipulating holidays and special dates
    - Incorporating categorical variables
    - Long-horizon forecasting
    - Forecasting multiple series
    - Fine-tuning TimeGPT
    - Working with specific loss functions
    - Cross-validation
    - Adding prediction intervals
    - Handling irregular timestamps

    These capabilities allow teams to handle real-world scenarios across different industries and problem domains.

  </Accordion>
  <Accordion title="When to Use TimeGPT for Forecasting">
    TimeGPT is a powerful choice when you need:

    - Rapid iteration without explicit training on your own datasets.
    - A flexible model that generalizes well across different time series scenarios.
    - Support for additional context or features like holidays, external events, or categorical data.

  </Accordion>
</AccordionGroup>

<CardGroup cols={2}>
  <Card title="Key Feature: Zero-Shot Forecasting">
    Zero-shot forecasting lets you generate predictions without having to train
    a new model from scratch on your data. This can significantly reduce your
    time to production for new or changing forecasting tasks.
  </Card>
  <Card title="Key Feature: Fine-Tuning">
    Gain performance boosts by fine-tuning TimeGPT on your own dataset or by
    leveraging specific loss functions. This approach helps tailor the model to
    your unique forecasting requirements.
  </Card>
</CardGroup>

<Check>
  By combining zero-shot approaches with optional fine-tuning, TimeGPT offers a
  robust and efficient solution for time series forecasting.
</Check>

<Steps>
  <Step title="1. Zero-Shot Forecasting">
    Zero-shot forecasting is an excellent starting point for quick insights.

    For detailed instructions, see: [Zero-shot forecasting documentation](https://docs.nixtla.io/docs/capabilities-forecast-quickstart).

  </Step>
  <Step title="2. Add Exogenous Variables">
    If you have additional external drivers or explanatory factors, include them to improve predictions.

    For more details, visit: [Forecasting with exogenous variables](https://docs.nixtla.io/docs/capabilities-forecast-add_exogenous_variables).

  </Step>
  <Step title="3. Incorporate Holidays or Special Dates">
    Holidays and special dates can have significant impact on time series signals.

    Learn how to handle them here: [Forecasting with holidays and special dates](https://docs.nixtla.io/docs/capabilities-forecast-add_holidays_and_special_dates).

  </Step>
</Steps>

<Tabs>
  <Tab title="More Forecasting Tasks">
    <AccordionGroup>
      <Accordion title="Forecasting with Categorical Variables">
        Explore how to add categorical information and improve your forecasts:
        [Forecasting with categorical
        variables](https://docs.nixtla.io/docs/capabilities-forecast-add_categorical_variables).
      </Accordion>
      <Accordion title="Long-Horizon Forecasting">
        Learn best practices for forecasting extended time periods well into the
        future: [Long-horizon
        forecasting](https://docs.nixtla.io/docs/capabilities-forecast-long_horizon_forecasting).
      </Accordion>
      <Accordion title="Forecasting Multiple Series">
        Handle multiple time series simultaneously to build scalable and
        efficient solutions: [Forecasting multiple
        series](https://docs.nixtla.io/docs/capabilities-forecast-multiple_series_forecasting).
      </Accordion>
    </AccordionGroup>
  </Tab>
  <Tab title="Fine-Tuning & Advanced Topics">
    <AccordionGroup>
      <Accordion title="Fine-Tuning TimeGPT">
        Adapt TimeGPT to your specific domain or data distribution: [Fine-tuning
        TimeGPT](https://docs.nixtla.io/docs/capabilities-forecast-fine_tuning).
      </Accordion>
      <Accordion title="Custom Loss Functions">
        Go beyond default metrics by defining custom loss functions:
        [Fine-tuning with a specific loss
        function](https://docs.nixtla.io/docs/capabilities-forecast-finetuning_with_a_custom_loss_function).
      </Accordion>
      <Accordion title="Cross-Validation">
        Ensure robust forecasting performance through cross-validation:
        [Cross-validation](https://docs.nixtla.io/docs/capabilities-forecast-cross_validation).
      </Accordion>
      <Accordion title="Prediction Intervals">
        Build prediction intervals to quantify uncertainty in your forecasts:
        [Adding prediction
        intervals](https://docs.nixtla.io/docs/capabilities-forecast-predictions_intervals).
      </Accordion>
      <Accordion title="Irregular Timestamps">
        Discover approaches to deal with missing or irregular time steps:
        [Handling irregular
        timestamps](https://docs.nixtla.io/docs/capabilities-forecast-irregular_timestamps).
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

<Info>
  Below is a concise code snippet to get started with zero-shot forecasting.
  This example demonstrates how to import TimeGPT and make a simple prediction.
</Info>

<CodeGroup>

```python Zero-Shot Forecasting Example
# Example: Zero-shot forecasting with TimeGPT
from timegpt import TimeGPT

# Initialize TimeGPT
gpt_model = TimeGPT()

# Sample time series data (replace with your own)
time_series_data = [10, 12, 13, 12, 15, 18, 20]

# Make a forecast
forecast = gpt_model.forecast(time_series_data, horizon=3)
print("Forecast:", forecast)
```

</CodeGroup>

<Check>
  Congratulations\! You are now equipped with TimeGPT's key forecasting
  features. Explore the linked guides for detailed instructions on advanced
  topics.
</Check>