如何正确导入事务稀疏矩阵?我的专栏太多了

时间:2019-05-24 07:44:48

标签: r arules

我正在尝试使用R and Arules软件包进行市场篮子分析。当我导入数据时,我将获得更多存在该项目的列的方法。有245个唯一项,这就是我应该获得的列数,但是,我却得到了145000列

order_trans <- read.transactions(
    file = "SparseMatrix.csv",
    format = "single",
    sep = ",",
    cols=c("Ticket Number","Items"),
    rm.duplicates = T
)

我应该得到173753,245的形状,但是我得到了:

transactions in sparse format with
 173753 transactions (rows) and
 145830 items (columns)

This is how the data looks like in CSV format

0 个答案:

没有答案