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:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user