【发布时间】:2020-11-17 08:56:00
【问题描述】:
我有一个包含 2 个特征(价格和数量)和 1 个预测变量(价格)的数据集,并使用 LTSM 模型根据前一组价格预测下一个价格。
首先我缩放数据集:
#Scale the data
scaler = MinMaxScaler(feature_range=(0,1))
scaled_data = scaler.fit_transform(dataset)
最后我想取消缩放它:
#Get the models predicted price values
predictions = model.predict(x_test)
predictions = scaler.inverse_transform(predictions)
但这不起作用,我收到此错误:
ValueError: non-broadcastable output operand with shape (400,1) doesn't match the broadcast shape (400,2)
【问题讨论】:
标签: python machine-learning scikit-learn