File size: 9,086 Bytes
2d13eb2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
[
  {
    "function_name": "Model.__init__",
    "file_path": "models/DLinear.py",
    "function_calls": [
      {
        "function_call_name": "super",
        "functionality": "Calls the __init__ method of the parent class (nn.Module).",
        "input": "(Model, self)",
        "output": "nn.Module",
        "location_or_namespace": "builtins"
      },
      {
        "function_call_name": "series_decomp",
        "functionality": "Decomposes a time series into trend and seasonal components.",
        "input": "configs.moving_avg",
        "output": "A series decomposition nn.Module",
        "location_or_namespace": "layers.Autoformer_EncDec"
      },
      {
        "function_call_name": "nn.ModuleList",
        "functionality": "Holds submodules in a list.",
        "input": "",
        "output": "torch.nn.ModuleList",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "range",
        "functionality": "Generates a sequence of numbers.",
        "input": "self.channels",
        "output": "iterator",
        "location_or_namespace": "builtins"
      },
      {
        "function_call_name": "self.Linear_Seasonal.append",
        "functionality": "Appends a new nn.Linear module to the ModuleList.",
        "input": "nn.Linear(self.seq_len, self.pred_len)",
        "output": "None",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "nn.Linear",
        "functionality": "Applies a linear transformation to the incoming data.",
        "input": "self.seq_len, self.pred_len or configs.enc_in * configs.seq_len, configs.num_class",
        "output": "torch.nn.Linear",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "self.Linear_Trend.append",
        "functionality": "Appends a new nn.Linear module to the ModuleList.",
        "input": "nn.Linear(self.seq_len, self.pred_len)",
        "output": "None",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "nn.Parameter",
        "functionality": "A kind of Tensor that is to be considered a module parameter.",
        "input": "(1 / self.seq_len) * torch.ones([self.pred_len, self.seq_len])",
        "output": "torch.nn.Parameter",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "torch.ones",
        "functionality": "Returns a tensor filled with the scalar value 1.",
        "input": "[self.pred_len, self.seq_len]",
        "output": "torch.Tensor",
        "location_or_namespace": "torch"
      }
    ]
  },
  {
    "function_name": "Model.encoder",
    "file_path": "models/DLinear.py",
    "function_calls": [
      {
        "function_call_name": "self.decompsition",
        "functionality": "Decomposes the input time series 'x' into seasonal and trend components.",
        "input": "x",
        "output": "seasonal_init (torch.Tensor), trend_init (torch.Tensor)",
        "location_or_namespace": "models/DLinear.py"
      },
      {
        "function_call_name": "seasonal_init.permute",
        "functionality": "Permutes the dimensions of the seasonal_init tensor.",
        "input": "0, 2, 1",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.Tensor"
      },
      {
        "function_call_name": "trend_init.permute",
        "functionality": "Permutes the dimensions of the trend_init tensor.",
        "input": "0, 2, 1",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.Tensor"
      },
      {
        "function_call_name": "torch.zeros",
        "functionality": "Returns a tensor filled with the scalar value 0.",
        "input": "[seasonal_init.size(0), seasonal_init.size(1), self.pred_len], dtype=seasonal_init.dtype",
        "output": "torch.Tensor",
        "location_or_namespace": "torch"
      },
      {
        "function_call_name": "seasonal_init.size",
        "functionality": "Returns the size of the seasonal_init tensor.",
        "input": "0 or 1",
        "output": "int",
        "location_or_namespace": "torch.Tensor"
      },
      {
        "function_call_name": "seasonal_init.to",
        "functionality": "Moves and/or casts the seasonal_init tensor.",
        "input": "seasonal_init.device",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.Tensor"
      },
      {
        "function_call_name": "range",
        "functionality": "Generates a sequence of numbers.",
        "input": "self.channels",
        "output": "iterator",
        "location_or_namespace": "builtins"
      },
      {
        "function_call_name": "self.Linear_Seasonal[i]",
        "functionality": "Applies the i-th seasonal linear layer.",
        "input": "seasonal_init[:, i, :]",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "self.Linear_Trend[i]",
        "functionality": "Applies the i-th trend linear layer.",
        "input": "trend_init[:, i, :]",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "self.Linear_Seasonal",
        "functionality": "Applies the shared seasonal linear layer.",
        "input": "seasonal_init",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "self.Linear_Trend",
        "functionality": "Applies the shared trend linear layer.",
        "input": "trend_init",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.nn"
      },
      {
        "function_call_name": "x.permute",
        "functionality": "Permutes the dimensions of the output tensor x.",
        "input": "0, 2, 1",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.Tensor"
      }
    ]
  },
  {
    "function_name": "Model.forecast",
    "file_path": "models/DLinear.py",
    "function_calls": [
      {
        "function_call_name": "self.encoder",
        "functionality": "Encodes the input time series to extract features for forecasting.",
        "input": "x_enc",
        "output": "torch.Tensor",
        "location_or_namespace": "models/DLinear.py"
      }
    ]
  },
  {
    "function_name": "Model.imputation",
    "file_path": "models/DLinear.py",
    "function_calls": [
      {
        "function_call_name": "self.encoder",
        "functionality": "Encodes the input time series to extract features for imputation.",
        "input": "x_enc",
        "output": "torch.Tensor",
        "location_or_namespace": "models/DLinear.py"
      }
    ]
  },
  {
    "function_name": "Model.anomaly_detection",
    "file_path": "models/DLinear.py",
    "function_calls": [
      {
        "function_call_name": "self.encoder",
        "functionality": "Encodes the input time series to extract features for anomaly detection.",
        "input": "x_enc",
        "output": "torch.Tensor",
        "location_or_namespace": "models/DLinear.py"
      }
    ]
  },
  {
    "function_name": "Model.classification",
    "file_path": "models/DLinear.py",
    "function_calls": [
      {
        "function_call_name": "self.encoder",
        "functionality": "Encodes the input time series to extract features.",
        "input": "x_enc",
        "output": "torch.Tensor",
        "location_or_namespace": "models/DLinear.py"
      },
      {
        "function_call_name": "enc_out.reshape",
        "functionality": "Reshapes the encoder output tensor.",
        "input": "enc_out.shape[0], -1",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.Tensor"
      },
      {
        "function_call_name": "self.projection",
        "functionality": "Applies a linear projection layer to the reshaped encoder output for classification.",
        "input": "output",
        "output": "torch.Tensor",
        "location_or_namespace": "torch.nn"
      }
    ]
  },
  {
    "function_name": "Model.forward",
    "file_path": "models/DLinear.py",
    "function_calls": [
      {
        "function_call_name": "self.forecast",
        "functionality": "Generates a forecast for the input series.",
        "input": "x_enc",
        "output": "torch.Tensor",
        "location_or_namespace": "models/DLinear.py"
      },
      {
        "function_call_name": "self.imputation",
        "functionality": "Performs imputation on the input series.",
        "input": "x_enc",
        "output": "torch.Tensor",
        "location_or_namespace": "models/DLinear.py"
      },
      {
        "function_call_name": "self.anomaly_detection",
        "functionality": "Performs anomaly detection on the input series.",
        "input": "x_enc",
        "output": "torch.Tensor",
        "location_or_namespace": "models/DLinear.py"
      },
      {
        "function_call_name": "self.classification",
        "functionality": "Performs classification on the input series.",
        "input": "x_enc",
        "output": "torch.Tensor",
        "location_or_namespace": "models/DLinear.py"
      }
    ]
  }
]