Time Series Forecasting
TimesFM
kashif HF staff commited on
Commit
8bd341d
1 Parent(s): 2fa3883

update the load_from_checkpoint

Browse files

as per PR https://github.com/google-research/timesfm/pull/8

Files changed (1) hide show
  1. README.md +11 -11
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  license: apache-2.0
3
- library_name: timesf
4
  pipeline_tag: time-series
5
  ---
6
 
@@ -20,10 +20,10 @@ This is not an officially supported Google product.
20
 
21
  ## Checkpoint timesfm-1.0-200m
22
 
23
- timesfm-1.0-200m is the first open model checkpoint:
24
 
25
- - It performs univariate time series forecasting for context lengths up tp 512 timepoints and any horizon lengths, with an optional frequency indicator.
26
- - It focuses on point forecasts, and does not support probabilistic forecasts. We experimentally offer quantile heads but they have not been calibrated after pretraining.
27
  - It requires the context to be contiguous (i.e. no "holes"), and the context and the horizon to be of the same frequency.
28
 
29
  ## Benchmarks
@@ -53,7 +53,7 @@ tfm = timesfm.TimesFm(
53
  model_dims=1280,
54
  backend=<backend>,
55
  )
56
- tfm.load_from_checkpoint(<checkpoint_path>)
57
  ```
58
 
59
  Note that the four parameters are fixed to load the 200m model
@@ -65,7 +65,7 @@ num_layers=20,
65
  model_dims=1280,
66
  ```
67
 
68
- 1. The context_len here can be set as the max context length **of the model**. You can provide shorter series to the `tfm.forecast()` function and the model will handle it. Currently the model handles a max context length of 512, which can be increased in later releases. The input time series can have **any context length**. Padding / truncation will be handled by the inference code if needed.
69
 
70
  2. The horizon length can be set to anything. We recommend setting it to the largest horizon length you would need in the forecasting tasks for your application. We generally recommend horizon length <= context length but it is not a requirement in the function call.
71
 
@@ -73,11 +73,11 @@ model_dims=1280,
73
 
74
  We provide APIs to forecast from either array inputs or `pandas` dataframe. Both forecast methods expect (1) the input time series contexts, (2) along with their frequencies. Please look at the documentation of the functions `tfm.forecast()` and `tfm.forecast_on_df()` for detailed instructions.
75
 
76
- In particular regarding the frequency, TimesFM expects a categorical indicator valued in {0, 1, 2}:
77
 
78
- - **0** (default): high frequency, long horizon time series. We recommend to use this for time series up to daily granularity.
79
- - **1**: medium frequency time series. We recommend to use this for weekly and monthly data.
80
- - **2**: low frequency, short horizon time series. We recommend to use this for anything beyond monthly, e.g. quarterly or yearly.
81
 
82
  This categorical value should be directly provided with the array inputs. For dataframe inputs, we convert the conventional letter coding of frequencies to our expected categories, that
83
 
@@ -90,7 +90,7 @@ Notice you do **NOT** have to strictly follow our recommendation here. Although
90
 
91
  Examples:
92
 
93
- Array inputs, with the frequencies set to low, medium and high respectively.
94
 
95
  ```python
96
  import numpy as np
 
1
  ---
2
  license: apache-2.0
3
+ library_name: timesfm
4
  pipeline_tag: time-series
5
  ---
6
 
 
20
 
21
  ## Checkpoint timesfm-1.0-200m
22
 
23
+ `timesfm-1.0-200m` is the first open model checkpoint:
24
 
25
+ - It performs univariate time series forecasting for context lengths up to 512 time points and any horizon lengths, with an optional frequency indicator.
26
+ - It focuses on point forecasts and does not support probabilistic forecasts. We experimentally offer quantile heads but they have not been calibrated after pretraining.
27
  - It requires the context to be contiguous (i.e. no "holes"), and the context and the horizon to be of the same frequency.
28
 
29
  ## Benchmarks
 
53
  model_dims=1280,
54
  backend=<backend>,
55
  )
56
+ tfm.load_from_checkpoint(repo_id="google/timesfm-1.0-200m")
57
  ```
58
 
59
  Note that the four parameters are fixed to load the 200m model
 
65
  model_dims=1280,
66
  ```
67
 
68
+ 1. The context_len here can be set as the max context length **of the model**. You can provide a shorter series to the `tfm.forecast()` function and the model will handle it. Currently, the model handles a max context length of 512, which can be increased in later releases. The input time series can have **any context length**. Padding / truncation will be handled by the inference code if needed.
69
 
70
  2. The horizon length can be set to anything. We recommend setting it to the largest horizon length you would need in the forecasting tasks for your application. We generally recommend horizon length <= context length but it is not a requirement in the function call.
71
 
 
73
 
74
  We provide APIs to forecast from either array inputs or `pandas` dataframe. Both forecast methods expect (1) the input time series contexts, (2) along with their frequencies. Please look at the documentation of the functions `tfm.forecast()` and `tfm.forecast_on_df()` for detailed instructions.
75
 
76
+ In particular, regarding the frequency, TimesFM expects a categorical indicator valued in {0, 1, 2}:
77
 
78
+ - **0** (default): high frequency, long horizon time series. We recommend using this for time series up to daily granularity.
79
+ - **1**: medium frequency time series. We recommend using this for weekly and monthly data.
80
+ - **2**: low frequency, short horizon time series. We recommend using this for anything beyond monthly, e.g. quarterly or yearly.
81
 
82
  This categorical value should be directly provided with the array inputs. For dataframe inputs, we convert the conventional letter coding of frequencies to our expected categories, that
83
 
 
90
 
91
  Examples:
92
 
93
+ Array inputs, with the frequencies set to low, medium, and high respectively.
94
 
95
  ```python
96
  import numpy as np