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

Function evaluate

examples/benchmarks/TRA/src/model.py:535–543  ·  view source on GitHub ↗
(pred)

Source from the content-addressed store, hash-verified

533
534
535def evaluate(pred):
536 pred = pred.rank(pct=True) # transform into percentiles
537 score = pred.score
538 label = pred.label
539 diff = score - label
540 MSE = (diff**2).mean()
541 MAE = (diff.abs()).mean()
542 IC = score.corr(label)
543 return {"MSE": MSE, "MAE": MAE, "IC": IC}
544
545
546def average_params(params_list):

Callers 1

test_epochMethod · 0.70

Calls 3

rankMethod · 0.80
meanMethod · 0.45
absMethod · 0.45

Tested by 1

test_epochMethod · 0.56