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

fix model when using single feature

This commit is contained in:
Dong Zhou
2020-11-24 21:03:52 +08:00
parent 73b280754d
commit e819879232
3 changed files with 4 additions and 4 deletions

View File

@@ -61,7 +61,7 @@ class CatBoostModel(Model):
if self.model is None:
raise ValueError("model is not fitted yet!")
x_test = dataset.prepare("test", col_set="feature")
return pd.Series(self.model.predict(np.squeeze(x_test.values)), index=x_test.index)
return pd.Series(self.model.predict(x_test.values), index=x_test.index)
if __name__ == "__main__":