python - 预测撰写消息需要多长时间的模型(使用 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% 确定。关于如何解决这个问题的任何想法都会很棒!
解决方案
推荐阅读
- dart - Dart:这些方括号在构造函数中的作用是什么?
- javascript - 无法从 axios 请求访问上传的文件到 laravel
- javascript - GatsbyJS 中的 Socket IO 客户端不起作用
- wayland - 两个简单的韦斯顿示例有什么区别?
- awk - 如何在unix文件中查找两个时间戳之间的行
- instagram - 过滤器在 Spark AR 模拟器中有效,但在应用程序中无效?
- python - 在python中将字符串从txt文件转换为数组
- node.js - 从 Angular 向 Node js API 发出 HTTP 请求的正确方法是什么?
- import - Isabelle 可以在名称中有空格的目录中导入文件吗?
- react-native - 更新 pod 后,我收到此错误。无效的 UIAccessibilityTraits '选项卡'