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
3
votes
2 answers

Mining sequences from data frame rows

long time answer-seeker, first time question-asker. I have an R data frame that is a single column, 267,000 rows with 17 factors, like so: regions VE PU PR DE NU AD DE NO AD I'm attempting to extract these as column sequences, with lengths of 2 and…
3
votes
1 answer

How how to turn arules apriori output into dataframe in R

I have the following dataframe - CTVU. MMGID_5 EMAIL 2341 1@email.x 50 1@email.x 311 1@email.x 2341 2@email.x 2387 2@email.x 57 2@email.x 2329 2@email.x 2026 3@email.x 650 3@email.x 2369…
Davis
  • 466
  • 4
  • 20
3
votes
1 answer

Market basket analysis with duplicated items in R using arules

I am currently using the arules package to perform a market basket analysis. My data that I read in looks like this (but with many more rows): >data transaction_id item 1 1 beer 2 1 beer 3 1 soda 4 …
3
votes
0 answers

R: arules packages eclat() error "error in eclat not enough memory".

I am using Rstudio server (R 3.2.3). Using eclat() with 5x,xxx transactions each of them has 35 items. I got the 'not enough memory' error below. However when I checked on RAM, there were still lot of free memory left. I have tried increasing…
3
votes
1 answer

Apriori, arulesSequences, in R : Does it have support for sequence of "baskets" (order within single shopping trip doesn't matter)?

I'm getting started with arulesSequences with an aim to perform Frequent Sequence Mining on some data I have. The data for a store A looks like below: CUSTOMER_ID seq_num Size bought_items 1 17399 1 2 {100,100} 2 …
ednaMode
  • 443
  • 3
  • 14
3
votes
2 answers

How to remove empty columns in transaction data read with the arules package?

I have a dataset made in the format of a basket data. I have read that dataset in R using a package call arules which has an inbuilt function for reading transactions, so I have used that and read my dataset. Following is the code I used: trans =…
Harish
  • 55
  • 7
3
votes
1 answer

Association rules with arules when fetching data from SQL server

Maybe I am just stupid but even then I would appreciate some helpful comments. I do have a dataset containing IDs, articles and article attributes (i.e. groupings). Using RODBC, I fetch the table from a SQL Server database (with sqlFetch).…
Daniel Schultz
  • 320
  • 2
  • 13
3
votes
0 answers

Main sequences from Arules Sequence Mining in R

How to remove the sub-sequences from cspade algorithm in arulesSequence package in R, For example if my data(Sample.txt) is as below Column Names: sequenceID, EventID, size, Item 1 1 1 A 1 2 1 B 1 3 1 C 1 4 1 D 2 1 1 …
RajaSekhar
  • 61
  • 1
  • 6
3
votes
4 answers

packages installation for arules in R

I have the same problem with previous post by another user How to upload arules package in R i am using R version 3.0.2 (32-bit) The error message is like this: > install.packages("arules") Installing package into…
useR
  • 3,062
  • 10
  • 51
  • 66
3
votes
2 answers

R arules, mine only rules from specific column

I would like to mine specific rhs rules. There is an example in the documentation which demonstrates that this is possible, but only for a specific case (as we see below). First an data set to illustrate my problem: input <- matrix( c( rep(10001,6)…
Freddy
  • 419
  • 8
  • 16
3
votes
2 answers

Can import sparse matrix to do association rule in R?

I have never use R ,but now I need import a sparse matrix to do association rule in R My import data is a sparse matrix like this:        i   j   x 1       2   3   1 2       3   5   1 3       3   1   1 4       2   5   1 .       .  …
3
votes
3 answers

prepare an arules transaction list

arules requires a list of transactions. each row in the list will contain an array of products. not every transaction has the same amount of products. it sounds like pivot but it's not. an example can be found here i want something…
haki
  • 9,389
  • 15
  • 62
  • 110
2
votes
0 answers

How to get association rules with RHS more than length 1 in R

I am trying to understand the use of R to run the apriori algorithm to mine association rules.Referencing an online exam question with solutions provided on Studocs Q2.2, it is expected that I get 8 association rules which fulfill the minimum…
Prashin Jeevaganth
  • 1,223
  • 1
  • 18
  • 42
2
votes
1 answer

R Arules Item Frequency Plot Rotate Axis labels

I'm doing some pattern mining in R using library(arules). Using ItemFrequencyPlot I am trying to rotate the x-axis labels and scale the axis names. library(arules) data(Adult) itemFrequencyPlot(Adult, topN=20, cex.names=0.7, las = 2, srt = 90,…
LRO
  • 79
  • 6
2
votes
1 answer

How to convert a data frame to arules' transaction object

I'm trying to do association rules on a dataset using the library arules in R. The dataset has a transaction column and 5 items columns - I'm trying to turn the data into a list to then use arules but because there is more then one items column I'm…
KarC
  • 101
  • 5
1 2
3
23 24