小编Dan*_*iel的帖子

Hive - LIKE运算符

我无法弄清楚我是如何处理这个问题的:

这是我的数据:

Table1:         Table2:
BRAND           PRODUCT           SOLD
Sony            Sony ABCD         1233
Apple           Sony adv          1233
Google          Sony aaaa         1233
IBM             Apple 123         1233
etc.            Apple 345         1233
                IBM 13123         1233
Run Code Online (Sandbox Code Playgroud)

是否有可能过滤查询,我有一个表格的品牌和销售总额?我的想法是:

Select table1.brand, sum(table2.sold) from table1
join table2
on (table1.brand LIKE '%table2.product%')
group by table.1.brand
Run Code Online (Sandbox Code Playgroud)

这是我的想法,但我总是得到一个错误

最大的问题是Like-Operator还是有其他解决方案吗?

hadoop hive hiveql sql-like

8
推荐指数
2
解决办法
6万
查看次数

预测模型提前一天预测——滑动窗口

我正在努力解决一个问题。我正在使用 SparkR 进行时间序列预测,但是这个场景也可以转移到普通的 R 环境中。我想使用回归模型(如随机森林回归等)来预测未来一天的负载,而不是使用 ARIMA 模型。我还阅读了滑动窗口方法来评估不同回归器相对于不同参数组合的性能。所以为了更好地理解这是我的数据集结构的一个例子:

Timestamp              UsageCPU     UsageMemory   Indicator  Delay
2014-01-03 21:50:00    3123            1231          1        123
2014-01-03 22:00:00    5123            2355          1        322
2014-01-03 22:10:00    3121            1233          2        321
2014-01-03 22:20:00    2111            1234          2        211
2014-01-03 22:30:00    1000            2222          2         0 
2014-01-03 22:40:00    4754            1599          1         0
Run Code Online (Sandbox Code Playgroud)

要使用任何类型的回归器,下一步是提取特征并将它们转换为可读格式,因为这些回归无法读取时间戳:

Year   Month  Day  Hour    Minute    UsageCPU   UsageMemory  Indicator Delay
2014   1      3    21       50        3123        1231          1      123
2014   1      3    22       00        5123        2355          1      322
2014   1      3    22 …
Run Code Online (Sandbox Code Playgroud)

statistics r machine-learning prediction sliding-window

6
推荐指数
1
解决办法
1715
查看次数