MCPcopy Create free account
hub / github.com/Anoise/WTFlib / forward

Method forward

LDPS_Graph/models/Stat_models.py:82–94  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

80 self.season = 1
81
82 def forward(self, x):
83 result = np.zeros([x.shape[0],self.pred_len,x.shape[2]])
84 threads = []
85 for bt,seqs in tqdm(enumerate(x)):
86 for i in range(seqs.shape[-1]):
87 seq = seqs[:,i]
88 one_seq = Naive_thread(func=_sarima,args=(self.season,seq,self.pred_len,bt,i))
89 threads.append(one_seq)
90 threads[-1].start()
91 for every_thread in tqdm(threads):
92 forcast,bt,i = every_thread.return_result()
93 result[bt,:,i] = forcast
94 return result # [B, L, D]
95
96def _gbrt(seq,seq_len,pred_len,bt,i):
97 model = GradientBoostingRegressor()

Callers

nothing calls this directly

Calls 2

Naive_threadClass · 0.85
return_resultMethod · 0.80

Tested by

no test coverage detected