KonradSzafer commited on
Commit
8914c00
1 Parent(s): c3d507e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +58 -0
README.md CHANGED
@@ -24,6 +24,64 @@ MOMENT is a family of foundation models for general-purpose time-series analysis
24
 
25
  For details on MOMENT models, training data, and experimental results, please refer to the paper [MOMENT: A Family of Open Time-series Foundation Models](https://arxiv.org/pdf/2402.03885.pdf).
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  ## Model Details
29
 
 
24
 
25
  For details on MOMENT models, training data, and experimental results, please refer to the paper [MOMENT: A Family of Open Time-series Foundation Models](https://arxiv.org/pdf/2402.03885.pdf).
26
 
27
+ # Usage
28
+
29
+ Install the package using:
30
+ ```bash
31
+ pip install git+https://github.com/moment-timeseries-foundation-model/moment-test.git
32
+ ```
33
+
34
+ To load the pre-trained model for one of the tasks, use one of the following code snippets:
35
+
36
+ **Forecasting**
37
+ ```python
38
+ from moment import MOMENTPipeline
39
+
40
+ model = MOMENTPipeline.from_pretrained(
41
+ "AutonLab/MOMENT-1-large",
42
+ model_kwargs={
43
+ 'task_name': 'forecasting',
44
+ 'forecast_horizon': 96
45
+ },
46
+ )
47
+ model.init()
48
+ ```
49
+
50
+ **Classification**
51
+ ```python
52
+ from moment import MOMENTPipeline
53
+
54
+ model = MOMENTPipeline.from_pretrained(
55
+ "AutonLab/MOMENT-1-large",
56
+ model_kwargs={
57
+ 'task_name': 'classification',
58
+ 'n_channels': 1,
59
+ 'num_class': 2
60
+ },
61
+ )
62
+ model.init()
63
+ ```
64
+
65
+ **Anomaly Detection/Imputation/Pre-training**
66
+ ```python
67
+ from moment import MOMENTPipeline
68
+
69
+ model = MOMENTPipeline.from_pretrained(
70
+ "AutonLab/MOMENT-1-large",
71
+ model_kwargs={"task_name": "reconstruction"},
72
+ )
73
+ mode.init()
74
+ ```
75
+
76
+ **Embedding**
77
+ ```python
78
+ from moment import MOMENTPipeline
79
+
80
+ model = MOMENTPipeline.from_pretrained(
81
+ "AutonLab/MOMENT-1-large",
82
+ model_kwargs={'task_name': 'embedding'},
83
+ )
84
+ ```
85
 
86
  ## Model Details
87