|
@@ -234,6 +234,8 @@ class DataHandler(object):
|
|
col_time, features = self.opt.col_time, self.opt.features
|
|
col_time, features = self.opt.col_time, self.opt.features
|
|
data = data.map(lambda x: float(x.to_decimal()) if isinstance(x, Decimal128) else float(x) if isinstance(x, numbers.Number) else x)
|
|
data = data.map(lambda x: float(x.to_decimal()) if isinstance(x, Decimal128) else float(x) if isinstance(x, numbers.Number) else x)
|
|
data = data.sort_values(by=col_time).reset_index(drop=True, inplace=False)
|
|
data = data.sort_values(by=col_time).reset_index(drop=True, inplace=False)
|
|
|
|
+ if not set(features).issubset(set(data.columns.tolist())):
|
|
|
|
+ raise ValueError("预测数据特征不满足模型特征!")
|
|
pre_data = data[features].copy()
|
|
pre_data = data[features].copy()
|
|
if self.opt.Model['predict_data_fill']:
|
|
if self.opt.Model['predict_data_fill']:
|
|
pre_data = self.fill_pre_data(pre_data)
|
|
pre_data = self.fill_pre_data(pre_data)
|