mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-16 17:12:20 +08:00
fix model when using single feature
This commit is contained in:
@@ -61,4 +61,4 @@ class XGBModel(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(xgb.DMatrix(np.squeeze(x_test.values))), index=x_test.index)
|
||||
return pd.Series(self.model.predict(xgb.DMatrix(x_test.values)), index=x_test.index)
|
||||
|
||||
Reference in New Issue
Block a user