Association Rules
Hi,
I have a table with 2 Columns ID and Product.
I want to Edit the Script in R, but I can't get it to work
How should it be the read.transactions statement?
> txn <- read.transactions(dataset, rm.duplicates= TRUE,format='basket',sep='','',cols =1)
But I get this error...
Error in readLines(file, encoding = encoding) : 'con' is not a connection
The data with 2 columns: "TransactionID" and "Product" is indeed very natural. Attached is the PBIX with R code suited to such input.
The relevant data transformation is in lines
nnn = names(dataset)
transData <- as(split(dataset[,nnn[2]], dataset[,nnn[1]]), "transactions")
The data in PBIX is synthetic.
- surething9 years agoNew Member
Hi,
I'm trying to use the R script to create association rules for transaction ID and item reference in PBI. I used the script you have in the example but it didn't seem to work. any idea why?
Thanks
- boefraty9 years agoMicrosoft Employee
It did not fail, it says "No rules generated" .
Try to relax thresholds of the rules. If you can to send me PBIX, I will have a look ([email protected])
- HowardCC9 years agoFrequent Visitor
I get the same msg when using the Showcase .pbix, "No rules generated"
Tried using different tresholds. I think it's due to using R 3.3.3 / 3.3.2.
Some packages won't load/install under R 3.3.1 using the install-script (were build under R 3.3.3 etc)
Any thoughts?