Skip to main content
deleted 6 characters in body
Source Link

Since new to association rules need help for identifying the most frequent extra service ordered together with the products. And to derive the association rules, I have used arules R package on past data.

I have collected and shaped the dataset as like you can download sample dataset from link (https://www.dropbox.com/s/4g5sqag9afsttmo/finaldf2.csv).

When I tried it with the following set of R codes, it can't calculate the association rules between product and services. But it calculates the rules between all services.

Can any one guide me why I am getting set of 0 rules for calculation of association rules of product. Am I doing something wrong to calculate the associations. Or My dataset should be different.

Here are the R codes generated for arules:

# Loading the library
library(arules)    

# Loading the dataset 
product.transaction.set <- read.csv("transactions"finaldf2.csv")    

# calculating the association with apriori algo
rules <- apriori(product.transaction.set, parameter = list(support = 0.4,conf = 0.6,target = "rules"))

## 1 - for product
# Deriving the association rules for productname
rules.sub.product <- subset(rules, subset = lhs %pin% "LD") # output -> set of 0 rules     

# for print the calculated association rules
inspect(rules.sub.product) 

## 2- for add on services ()
# Deriving the association rules for add on services
rules.sub.services <- subset(rules, subset = lhs %pin% "AO1") # output -> set of 1 rules 

# for print the calculated association rules
inspect(rules.sub.services) 

Since new to association rules need help for identifying the most frequent extra service ordered together with the products. And to derive the association rules, I have used arules R package on past data.

I have collected and shaped the dataset as like you can download sample dataset from link (https://www.dropbox.com/s/4g5sqag9afsttmo/finaldf2.csv).

When I tried it with the following set of R codes, it can't calculate the association rules between product and services. But it calculates the rules between all services.

Can any one guide me why I am getting set of 0 rules for calculation of association rules of product. Am I doing something wrong to calculate the associations. Or My dataset should be different.

Here are the R codes generated for arules:

# Loading the library
library(arules)    

# Loading the dataset 
product.transaction.set <- read.csv("transactions.csv")    

# calculating the association with apriori algo
rules <- apriori(product.transaction.set, parameter = list(support = 0.4,conf = 0.6,target = "rules"))

## 1 - for product
# Deriving the association rules for productname
rules.sub.product <- subset(rules, subset = lhs %pin% "LD") # output -> set of 0 rules     

# for print the calculated association rules
inspect(rules.sub.product) 

## 2- for add on services ()
# Deriving the association rules for add on services
rules.sub.services <- subset(rules, subset = lhs %pin% "AO1") # output -> set of 1 rules 

# for print the calculated association rules
inspect(rules.sub.services) 

Since new to association rules need help for identifying the most frequent extra service ordered together with the products. And to derive the association rules, I have used arules R package on past data.

I have collected and shaped the dataset as like you can download sample dataset from link (https://www.dropbox.com/s/4g5sqag9afsttmo/finaldf2.csv).

When I tried it with the following set of R codes, it can't calculate the association rules between product and services. But it calculates the rules between all services.

Can any one guide me why I am getting set of 0 rules for calculation of association rules of product. Am I doing something wrong to calculate the associations. Or My dataset should be different.

Here are the R codes generated for arules:

# Loading the library
library(arules)    

# Loading the dataset 
product.transaction.set <- read.csv("finaldf2.csv")    

# calculating the association with apriori algo
rules <- apriori(product.transaction.set, parameter = list(support = 0.4,conf = 0.6,target = "rules"))

## 1 - for product
# Deriving the association rules for productname
rules.sub.product <- subset(rules, subset = lhs %pin% "LD") # output -> set of 0 rules     

# for print the calculated association rules
inspect(rules.sub.product) 

## 2- for add on services ()
# Deriving the association rules for add on services
rules.sub.services <- subset(rules, subset = lhs %pin% "AO1") # output -> set of 1 rules 

# for print the calculated association rules
inspect(rules.sub.services) 
deleted 5 characters in body; edited title
Source Link
user88
user88

Association analysis : (set ofreturns 0 useful rules )

Since new to association rules need help for identifying the most frequent extra service ordered together with the products. And to derive the association rules, I have used arulesarules R package on past data.

I have collected and shaped the dataset as like you can download sample dataset from link (https://www.dropbox.com/s/4g5sqag9afsttmo/finaldf2.csv).

When I tried it with the following set of R codes, it cant able tocan't calculate the association rules between prouctproduct and services. But it calculates the rules between all services.

Can any one guide me why I am getting set of 0 rules for calculation of association rules of product. Am I doing something wrong to calculate the associations. Or My dataset should be different.

Here are the R codes generated for arules:

Here are the R codes generated for arules ::
# Loading the library
library(arules)    

# Loading the dataset 
product.transaction.set <- read.csv("transactions.csv")    

# calculating the association with apriori algo
rules <- apriori(product.transaction.set, parameter = list(support = 0.4,conf = 0.6,target = "rules"))

## 1 - for product
# Deriving the association rules for productname
rules.sub.product <- subset(rules, subset = lhs %pin% "LD") # output -> set of 0 rules     

# for print the calculated association rules
inspect(rules.sub.product) 

## 2- for add on services ()
# Deriving the association rules for add on services
rules.sub.services <- subset(rules, subset = lhs %pin% "AO1") # output -> set of 1 rules 

# for print the calculated association rules
inspect(rules.sub.services) 

Association analysis : (set of 0 rules )

Since new to association rules need help for identifying the most frequent extra service ordered together with the products. And to derive the association rules, I have used arules R package on past data.

I have collected and shaped the dataset as like you can download sample dataset from link (https://www.dropbox.com/s/4g5sqag9afsttmo/finaldf2.csv)

When I tried it with the following set of R codes, it cant able to calculate the association rules between prouct and services. But it calculates the rules between all services.

Can any one guide me why I am getting set of 0 rules for calculation of association rules of product. Am I doing something wrong to calculate the associations. Or My dataset should be different.

Here are the R codes generated for arules ::
# Loading the library
library(arules)    

# Loading the dataset 
product.transaction.set <- read.csv("transactions.csv")    

# calculating the association with apriori algo
rules <- apriori(product.transaction.set, parameter = list(support = 0.4,conf = 0.6,target = "rules"))

## 1 - for product
# Deriving the association rules for productname
rules.sub.product <- subset(rules, subset = lhs %pin% "LD") # output -> set of 0 rules     

# for print the calculated association rules
inspect(rules.sub.product) 

## 2- for add on services ()
# Deriving the association rules for add on services
rules.sub.services <- subset(rules, subset = lhs %pin% "AO1") # output -> set of 1 rules 

# for print the calculated association rules
inspect(rules.sub.services) 

Association analysis returns 0 useful rules

Since new to association rules need help for identifying the most frequent extra service ordered together with the products. And to derive the association rules, I have used arules R package on past data.

I have collected and shaped the dataset as like you can download sample dataset from link (https://www.dropbox.com/s/4g5sqag9afsttmo/finaldf2.csv).

When I tried it with the following set of R codes, it can't calculate the association rules between product and services. But it calculates the rules between all services.

Can any one guide me why I am getting set of 0 rules for calculation of association rules of product. Am I doing something wrong to calculate the associations. Or My dataset should be different.

Here are the R codes generated for arules:

# Loading the library
library(arules)    

# Loading the dataset 
product.transaction.set <- read.csv("transactions.csv")    

# calculating the association with apriori algo
rules <- apriori(product.transaction.set, parameter = list(support = 0.4,conf = 0.6,target = "rules"))

## 1 - for product
# Deriving the association rules for productname
rules.sub.product <- subset(rules, subset = lhs %pin% "LD") # output -> set of 0 rules     

# for print the calculated association rules
inspect(rules.sub.product) 

## 2- for add on services ()
# Deriving the association rules for add on services
rules.sub.services <- subset(rules, subset = lhs %pin% "AO1") # output -> set of 1 rules 

# for print the calculated association rules
inspect(rules.sub.services) 
edited tags
Link
Source Link
Loading