【发布时间】:2017-03-02 08:37:46
【问题描述】:
我有一个看起来像这样的 df:
selection.body selection.hair selection.eyes selection.breasts selection.butt selection.skin
normal blonde other large medium tanned
normal blonde other xl medium tanned
normal blonde other large medium tanned
chubby blonde blue xl large tanned
slim blonde other medium small white
让我们把这个数据集想象成一个调查的答案:
- 每一行代表单个响应者的选择,从一组封闭的偏好中选择他的偏好。
我已经做的是检查每个选择的频率,但我想继续前进。
我的目标是:
找出最常见的选择组合。
根据这种组合对用户进行分组。
选择之间的相关性
感谢您的提示。
【问题讨论】:
-
试试
data.table。以下语法应该足以回答前两个问题:dt[,.(Count = .N),.(col1, col2... etc)]。对于第三个问题,请尝试来自 base 的?cor和corrplot包。 -
在我看来你只是把你的任务交给了别人!
-
我没有要求任何代码。我只是要求进行头脑风暴并有开始的提示。在我看来,你手头有很多时间
标签: r scikit-learn cluster-analysis data-science