MCPcopy
hub / github.com/microsoft/qlib / predict

Method predict

examples/benchmarks/TRA/src/model.py:314–323  ·  view source on GitHub ↗
(self, dataset, segment="test")

Source from the content-addressed store, hash-verified

312 json.dump(info, f)
313
314 def predict(self, dataset, segment="test"):
315 if not self.fitted:
316 raise ValueError("model is not fitted yet!")
317
318 test_set = dataset.prepare(segment)
319
320 metrics, preds = self.test_epoch(test_set, return_pred=True)
321 self.logger.info("test metrics: %s" % metrics)
322
323 return preds
324
325
326class LSTM(nn.Module):

Callers

nothing calls this directly

Calls 3

test_epochMethod · 0.95
prepareMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected