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

Filter by
Sorted by
Tagged with
27
votes
3answers
45k views

how to convert data.frame to transactions for arules

I read data from a csv file, the data has 3 columns, one is transaction id, the other two are product and product catagory. I need to convert this into transactions in order to use the apriori ...
19
votes
5answers
63k views

Load a dataset into R with data() using a variable instead of the dataset name

I am trying to load a dataset into R using the data() function. It works fine when I use the dataset name (e.g. data(Titanic) or data("Titanic")). What doesn't work for me is loading a dataset using a ...
15
votes
2answers
16k views

Writing rules generated by Apriori

I'm working with some large transactions data. I've been using read.transactions and apriori (parts of the arules package) to mine for frequent item pairings. My problem is this: when rules are ...
8
votes
2answers
13k views

How to prep transaction data into basket for arules

Ok, so I have searched a lot and want to run arules on sales data. I just need to properly get the data in the right format and set up with the correct "factors" or "variables" and in basket form. ...
8
votes
5answers
5k views

Arules Sequence Mining in R

I am looking to use the arulesSequences package in R. However, I have no idea as to how to coerce my data frame into an object that can leverage this package. Here is a toy dataset that replicates ...
7
votes
2answers
11k views

R Basket Analysis using arules package with unique order number but duplicate order combinations

R Basket analysis using arules package with unique order number but duplicate order combinations Just learning R. I'm trying to do a basket analysis using the arules package (but I'm totally open to ...
6
votes
3answers
8k views

Association rule in R - removing redundant rule (arules)

Assume we have 3 rules: [1] {A,B,D} -> {C} [2] {A,B} -> {C} [3] Whatever it is Rule [2] is a subset of rule [1] (because rule [1] contains all the items in rule [2]), so rule [1] should be ...
6
votes
3answers
14k views

Association analysis with duplicate transactions using arules package in R

I want to create a transaction object in basket format which I can call anytime for my analyses. The data contains comma separated items with 1001 transactions. The first 10 transactions look like ...
6
votes
2answers
4k views

Arules returning empty LHS

I have a dataset which looks like this: "user.get","search_restaurants","cuisines.get" "user.get","search_restaurants","user.get","search_restaurants" "order/address/get_user_addresses" "...
5
votes
3answers
19k views

How to get items for both LHS and RHS for only specific columns in arules?

Within the apriori function, I want the outcome to only contain these two variables in the LHS HouseOwnerFlag=0 and HouseOwnerFlag=1. The RHS should only contain attributes from the column Product. ...
5
votes
1answer
2k views

View built-in dataset from a package

I have installed the packages arules. How can I view the built-in dataset as usual? I tried: library(arules) data(Groceries) Groceries While it only offer me: transactions in sparse format with ...
5
votes
2answers
5k views

R - arules apriori Error in length(obj) : Method length not implemented for class rules

I am attempting to make an association rules set using apriori - I am using a different dataset but the starwars dataset contains similar issues. Using arules I was attempting to list the rules and ...
5
votes
4answers
7k views

Package arules in R: getting rules with only one item in the left-hand side

I am using the package arules in R to generate association rules. I would like to restrict the rules so that in the left-hand side there's only one particular element, let's call it "potatoe". If I ...
5
votes
1answer
2k views

R arulesSequences - which frequent sequences are present in a transaction?

When doing frequent sequence mining, one typically wants to the following tasks: 1. Find sequential patterns (frequent sequences). 2. Find out which sequential patterns apply to a transaction. I.e.: ...
5
votes
1answer
131 views

base package used when arules is required. Specifying package doesn't work

I'm trying to write a single format file within the arules package, to load it in as a transaction afterwards for association rule mining. I can't use this function, since R keeps using the base::...

15 30 50 per page
1
2 3 4 5
…
22