1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-10 14:26:56 +08:00

make the integration simpler

This commit is contained in:
Young
2020-09-25 04:39:59 +00:00
parent 9556d1ce38
commit 900e284696
4 changed files with 27 additions and 19 deletions

View File

@@ -92,7 +92,10 @@ def train():
pred_score["score"] = _pred.iloc(axis=1)[0]
# get performance
model_score = model.score(x_test, y_test)
try:
model_score = model.score(x_test, y_test)
except NotImplementedError:
model_score = None
# Remove rows from x, y and w, which contain Nan in any columns in y_test.
x_test, y_test, __ = drop_nan_by_y_index(x_test, y_test)
pred_test = model.predict(x_test)