Market Basket Analysis v R
Christopher Bruffaerts
Statistician
| TID | Transakce |
|---|---|
| 1 | {Bread, Butter, Cheese, Wine} |
| 2 | {Bread, Butter, Wine} |
| 3 | {Bread, Butter} |
| 4 | {Butter, Cheese, Wine} |
| 5 | {Butter, Cheese} |
| 6 | {Cheese, Wine} |
| 7 | {Butter, Wine} |
Graf četnosti položek

Absolutní typ
itemFrequencyPlot(data_trx,
main='Absolute Item Frequency Plot',
type="absolute"
)
Relativní typ
itemFrequencyPlot(data_trx,
main='Relative Item Frequency Plot',
type="relative"
)


Řazení a filtrování pomocí topN
itemFrequencyPlot(
data_trx,
topN = 4,
main = 'Absolute Item Frequency Plot',
type = "absolute"
)

Otočení a přizpůsobení grafu
itemFrequencyPlot(
data_trx,
topN = 4,
main = 'Absolute Item Frequency Plot',
type = "absolute",
col = rainbow(4),
ylab = "",
cex.names = 1.2,
horiz = TRUE
)

Market Basket Analysis v R