0

我使用Prophet预测现场活动(音乐会)的门票销售。到目前为止,我只处理一个事件。为了改进预测,我想将几​​场音乐会的数据链接起来,这些音乐会都与我计划预测的音乐会相关。

现在的挑战是,每个事件都有不同的最大值。容量。因此,在 total_gross 中为event_id 1出售 10000000 与为event_id 2出售 5000000 一样好(在这种情况下,两者都将售罄)。一些样本数据:

id  created                         total_gross event_id    max_capacity
1   2019-03-01 10:57:32.381378+00   18760       1   10000000
2   2019-03-01 10:58:30.93307+00    9380        1   10000000
3   2019-03-01 10:58:45.425421+00   7380        1   10000000
4   2019-03-01 10:59:11.588687+00   14760       1   10000000
5   2018-03-01 11:14:15.630797+00   7380        2   5000000
6   2018-03-01 11:14:25.308153+00   36900       2   5000000
7   2018-03-01 11:14:34.781773+00   7380        2   5000000

在我的图纸上,您可以在“缩放之前”的顶部看到缩放后在底部看到红色。我现在想知道“转换”我的数据的正确方法是什么。是MinMaxScaler正确的工具吗?我会像这里一样简单地将这些数组传递给它吗?

np.array([[ total_gross, max_capacity_event_1],
         [ total_gross2,  max_capacity_event_1],
         [ total_gross, max_capacity_event_2],
         [...]])
4

0 回答 0