spark-ts TimeSeriesRDD - 如何创建每小时频率的 DateTimeIndex?
spark-ts TimeSeriesRDD - how to create DateTimeIndex with hourly frequency?
我正在关注cloudera blog on using spark-ts for time series analysis in scala。我想创建一个每小时频率的 DateTimeIndex。博客中的示例显示了如何创建具有工作日频率的 DateTimeIndex,如下所示:
val dtIndex = DateTimeIndex.uniform(
new DateTime("2015-08-03"), new DateTime("2015-09-22"), new BusinessDayFrequency(1))
我希望在 github repository of DateTimeIndex.scala from author Sandy Ryza 中找到解决方案,但到目前为止还没有弄清楚。
我需要如何修改上面的示例以生成每小时频率的索引?
有一个HourFrequency
class:
val dtIndex = DateTimeIndex.uniform(
new DateTime("2015-08-03"), new DateTime("2015-09-22"), new HourFrequency(1))
我正在关注cloudera blog on using spark-ts for time series analysis in scala。我想创建一个每小时频率的 DateTimeIndex。博客中的示例显示了如何创建具有工作日频率的 DateTimeIndex,如下所示:
val dtIndex = DateTimeIndex.uniform(
new DateTime("2015-08-03"), new DateTime("2015-09-22"), new BusinessDayFrequency(1))
我希望在 github repository of DateTimeIndex.scala from author Sandy Ryza 中找到解决方案,但到目前为止还没有弄清楚。
我需要如何修改上面的示例以生成每小时频率的索引?
有一个HourFrequency
class:
val dtIndex = DateTimeIndex.uniform(
new DateTime("2015-08-03"), new DateTime("2015-09-22"), new HourFrequency(1))