Questions tagged [arules]

arules is an R package, which provides the infrastructure for representing, manipulating and analyzing transaction data and patterns: frequent itemsets and association rules

The R package arules implements the basic infrastructure for creating and manipulating transaction databases and basic algorithms to efficiently find and analyze association rules. Several more packages provide provide additional functionality like frequent sequence mining, association rule visualization and associative classification techniques:

351 questions
0
votes
1 answer

ItemfrequencyPlot - Arules package to show bottom frequency itemsets

I want to see the bottom frequency items in the transaction data, how can i see that? code: a_list <- list( c("a","b","c"), c("a","b"), c("a","b","d"), c("c","e"), c("a","b","d","e") ) trans <- as(a_list,…
maddy2u
  • 148
  • 1
  • 2
  • 11
0
votes
1 answer

R associations rules with arules package - how to split rule formula into vector of elements?

I have a data.frame object which I obtain by converting an object of class rules into data.frame in this way: trx.cpf.rules.df <- as(trx.cpf.rules, "data.frame") (You can build the trx.cpf.rules.df object from the structure dputed here). The…
Marta Karas
  • 4,967
  • 10
  • 47
  • 77
0
votes
1 answer

How to remove the extra commas from a csv file?

I was trying to use a csv file in R in read.transactions() command from arules package. The csv file when opened in Notepad++ shows extra commas for every non-existing values. So, I'm having to manually delete those extra commas before using the csv…
LearneR
  • 2,351
  • 3
  • 26
  • 50
0
votes
0 answers

arules package reads in blanks as items

In the arules package you can read in transaction data such as the example groceries dataset: groceries <- read.transactions("groceries.csv", sep = ",", rm.duplicates=T) If you then inspect the transactions you get: inspect(groceries[1:3]) items …
Cybernetic
  • 12,628
  • 16
  • 93
  • 132
0
votes
1 answer

Post-processing of rules from arules

Is there a way how more than one level of single variable gets used in single rule generated by apriori in arules package? Consider the following example: df <- read.table(header = TRUE, text = ' V1 V2 V3 a d x a d x a d y b d x…
Tomas Greif
  • 21,685
  • 23
  • 106
  • 155
0
votes
1 answer

Input external rules to arulesViz

I have an excel file of rules: a column for Antecedents, another for Consequents, other for Support, etc I'm trying to create a "rules" object to plot them using arulesViz. http://www.inside-r.org/packages/cran/arules/docs/rhs new("rules", ...) I'm…
user3437823
  • 351
  • 2
  • 14
0
votes
1 answer

Converting from regular format to sparse format for arules package

I am trying to convert my regular data set to sparse format. All documentations have examples with 'sparse format' Can you help me please? My sample data set: ID Item 1 Avas 2 Alo 2 Erbi 8 Abra 8 Ali 9 Inj 10 Avas 11 Avas
Murali
  • 579
  • 1
  • 6
  • 20
0
votes
1 answer

R How to load Sparse data for arules package

I have CSV which has text data that looks similar to: citrus fruit,semi-finished bread,margarine,ready soups tropical fruit,yogurt,coffee whole milk pip fruit,yogurt,cream cheese ,meat spreads other vegetables,whole milk,condensed milk,long life…
shecode
  • 1,716
  • 6
  • 32
  • 50
0
votes
1 answer

R and MapReduce to find association rules

i'm at beginning with hadoop, i need to use it to calculate association rules of a very large dataset. i can't understend how to use R Hadoop and MapReduce to find from a dataset association rules. I have the transaction matrix but what i need to do…
ntrax
  • 457
  • 4
  • 22
0
votes
1 answer

R: Convert Data Frame to Transactions to Use ARules Package

I have a csv file that looks like the below data frame once it is imported: df <- read("data.csv") ID Name Flag1 Flag2 Flag3 Flag4 1 a 0 F2 F3 F4 2 b F1 0 F3 F4 3 c 0 F2 F3 0 4 d 0 F2…
Cinji18
  • 619
  • 8
  • 22
0
votes
1 answer

One-step vs. two-step assocation rule mining in arules - Why does it differ?

To my understanding the Apriori algorithm works by first finding all frequent itemsets that meet the support threshold and then generate strong association rules from the frequent itemset that also meet minimum confidence. Hence I would expect that…
Roy van der Valk
  • 527
  • 1
  • 6
  • 18
0
votes
1 answer

R arules freezes depending on data format

I am facing aproblem with arules package in R. I am trying to carry out market basket analysis on a supermarket dataset. If I use data in the…
COLO
  • 1,024
  • 16
  • 28
0
votes
1 answer

Delete named column from transactions

I have a transaction object trans created using read.transaction(). How do I delete a named column from trans?
David Soroko
  • 8,521
  • 2
  • 39
  • 51
0
votes
1 answer

How to apply association rules for test transactions in R?

I have two datasets including training and test. For training dataset, I extracted many association rules as below. Now I would like to use these rules for test transaction dataset. I need to find transaction ids which match these rules. Help…
0
votes
1 answer

Association rule mining using arules package in R

I am trying to find association rules using arules package in R. I am using a csv file to create the transaction object. I am getting an incorrect item set. This is what the data looks…
NG_21
  • 685
  • 2
  • 13
  • 22