首页 > 解决方案 > 预测撰写消息需要多长时间的模型(使用 Python)

问题描述

客观的

我有一个数据集 df,它具有与唯一用户 ID 相关联的数百万个 Duration 值(以秒为单位)。考虑到我目前拥有的数据,我希望找出一种方法来预测撰写消息所需的静态时间。这甚至可能吗?

  UserID     Date                                     Duration (s)
  A          1/1/2020 1:10:00PM                       300
  B          1/1/2020 2:00:00PM                       800
  C          1/1/2020 3:00:00PM                       150
  D          1/1/2020 4:00:00PM                       100

期望的输出:

 static time that it takes to compose a given message:   300 seconds
 (hypothetically speaking once I find this appropriate model)

输入:

 structure(list(UserID = structure(1:4, .Label = c("A", "B", "C", 
 "D"), class = "factor"), Date = structure(1:4, .Label = c("1/1/2020 1:20:00 PM", 
 "1/1/2020 2:00:00 PM", "1/1/2020 3:00:00 PM", "1/1/2020 4:00:00 PM"
 ), class = "factor"), Duration = c(300L, 800L, 150L, 100L)), class = "data.frame", row.names =      c(NA, 
-4L))

我在想什么:

我在想我可以在 Python 中使用逻辑回归、最近邻或决策树(或某种类型的监督学习算法),但我不能 100% 确定。关于如何解决这个问题的任何想法都会很棒!

标签: pythonpandasnumpyprediction

解决方案


推荐阅读