我正在尝试运行一些模型来进行归因建模:
我的输入是这样的:
我的代码是
Data = read.csv("agg_attribution_model_input_90days_201709281041.csv")
> Data
path.total_conversions.total_conversion_value.total_null.assigned_cost
1 4905call > 4767call;1;322.799987793;1;53.1883528852
2 call > 9530call > 9530call > 1761mail;1;720;1;0
3 9599call;1;924.4400024414;1;48.162603373
4 3944mail > 1345mail > 9532call > 3944mail > 1345mail > 9533call > 9530call > 9533call > 9530call > 4915call;1;360;1;0
> library(ChannelAttribution)
> library(reshape)
> library(ggplot2)
> H <- heuristic_models(Data, 'path', 'total_conversions', var_value='total_conversion_value')
Error in heuristic_models(Data, "path", "total_conversions", var_value = "total_conversion_value") :
index out of bounds我猜它是不是读错了我的文件?我是R的新手,在这方面我找不到帮助我的东西..有什么想法吗?
发布于 2019-05-09 22:21:02
出现该错误是因为您正在使用启发式模型中的当前索引,该索引不可用。
实际上,您应该添加一个新的索引,以便正确运行该方法。在我的例子中,它是有效的。
https://stackoverflow.com/questions/46465005
复制相似问题