siriuz42 commited on
Commit
26233ff
·
verified ·
1 Parent(s): 3099d91

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md CHANGED
@@ -30,3 +30,42 @@ This checkpoint is not an officially supported Google product. See [TimesFM in B
30
  - [Wikimedia Pageviews](https://meta.wikimedia.org/wiki/Pageviews_Analysis), cutoff Nov 2023 (see [paper](https://arxiv.org/abs/2310.10688) for details).
31
  - [Google Trends](https://trends.google.com/trends/) top queries, cutoff EoY 2022 (see [paper](https://arxiv.org/abs/2310.10688) for details).
32
  - Synthetic and augmented data.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  - [Wikimedia Pageviews](https://meta.wikimedia.org/wiki/Pageviews_Analysis), cutoff Nov 2023 (see [paper](https://arxiv.org/abs/2310.10688) for details).
31
  - [Google Trends](https://trends.google.com/trends/) top queries, cutoff EoY 2022 (see [paper](https://arxiv.org/abs/2310.10688) for details).
32
  - Synthetic and augmented data.
33
+
34
+ ### Install
35
+
36
+ `pip install` from PyPI coming soon. At this point, please run
37
+
38
+ ```shell
39
+ git clone https://github.com/google-research/timesfm.git
40
+ cd timesfm
41
+ pip install -e .
42
+ ```
43
+
44
+ ### Code Example
45
+
46
+ ```python
47
+ import numpy as np
48
+ import timesfm
49
+ model = timesfm.TimesFM_2p5_200M_torch()
50
+ model.load_checkpoint()
51
+ model.compile(
52
+ timesfm.ForecastConfig(
53
+ max_context=1024,
54
+ max_horizon=256,
55
+ normalize_inputs=True,
56
+ use_continuous_quantile_head=True,
57
+ force_flip_invariance=True,
58
+ infer_is_positive=True,
59
+ fix_quantile_crossing=True,
60
+ )
61
+ )
62
+ point_forecast, quantile_forecast = model.forecast(
63
+ horizon=12,
64
+ inputs=[
65
+ np.linspace(0, 1, 100),
66
+ np.sin(np.linspace(0, 20, 67)),
67
+ ], # Two dummy inputs
68
+ )
69
+ point_forecast.shape # (2, 12)
70
+ quantile_forecast.shape # (2, 12, 10): mean, then 10th to 90th quantiles.
71
+ ```