
Last chance! 50% off unlimited learning
Sale ends in
AutoMarketBasketModel function runs a market basket analysis automatically. It will convert your data, run the algorithm, and add on additional significance values not orginally contained within.
AutoMarketBasketModel(data, OrderIDColumnName, ItemIDColumnName,
LHS_Delimeter = ",", Support = 0.001, Confidence = 0.1,
MaxLength = 2, MinLength = 2, MaxTime = 5)
This is your transactions data set
Supply your column name for the Order ID Values
Supply your column name for the Item ID Values
Default delimeter for separating multiple ItemID's is a comma.
Threshold for inclusion using support
Threshold for inclusion using confidence
Maximum combinations of Item ID (number of items in basket to consider)
Minimum length of combinations of ItemID (number of items in basket to consider)
Max run time per iteration (default is 5 seconds)
Chi-sq statistics and p-values based on this paper: http://www.cs.bc.edu/~alvarez/ChiSquare/chi2tr.pdf
Other Marketing Modeling: AutoRecomDataCreate
,
AutoRecommenderScoring
,
AutoRecommender
# NOT RUN {
rules_data <- AutoMarketBasketModel(
data,
OrderIDColumnName = "OrderNumber",
ItemIDColumnName = "ItemNumber",
LHS_Delimeter = ",",
Support = 0.001,
Confidence = 0.1,
MaxLength = 2,
MinLength = 2,
MaxTime = 5)
# }
Run the code above in your browser using DataLab