不好意思,代码没显示出来,这里补上
> catalog<- read.transactions("CatalogCrossSell.csv")
> summary(catalog)
transactions as itemMatrix in sparse format with
201 rows (elements/itemsets/transactions) and
88 columns (items) and a density of 0.01142017
most frequent items:
1,1,1,0,0,1,0,0, 1,1,1,0,0,0,0,1, 0,0,0,1,0,1,0,1, 1,0,0,0,0,1,0,0, 1,1,1,0,0,1,0,1, (Other)
16 9 7 7 7 156
element (itemset/transaction) length distribution:
sizes
1 2
200 1
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.000 1.000 1.000 1.005 1.000 2.000
includes extended item information - examples:
labels
1 0,0,0,0,0,1,0,0,
2 0,0,0,0,1,0,1,0,
3 0,0,0,0,1,0,1,1,
> str(catalog)
Formal class 'transactions' [package "arules"] with 3 slots
..@ data :Formal class 'ngCMatrix' [package "Matrix"] with 5 slots
.. .. ..@ i : int [1:202] 86 87 7 56 60 54 40 10 69 66 ...
.. .. ..@ p : int [1:202] 0 2 3 4 5 6 7 8 9 10 ...
.. .. ..@ Dim : int [1:2] 88 201
.. .. ..@ Dimnames:List of 2
.. .. .. ..$ : NULL
.. .. .. ..$ : NULL
.. .. ..@ factors : list()
..@ itemInfo :'data.frame': 88 obs. of 1 variable:
.. ..$ labels: chr [1:88] "0,0,0,0,0,1,0,0," "0,0,0,0,1,0,1,0," "0,0,0,0,1,0,1,1," "0,0,0,0,1,1,0,1," ...
..@ itemsetInfo:'data.frame': 0 obs. of 0 variables