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

前端 未结 2 724
傲寒
傲寒 2021-02-04 17:11

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 pa

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 18:07

    You must remove duplicates, if you are using .CSV file, please run Data -> Remove Duplicate in Excel before processing this file. arules throws error if duplicate are found and it is because of that you are getting the error.

    Another way is to use duplicated() on your itemset and remove the duplicate using unique().

    Or a more simple approach would be found in this SO post

    Association analysis with duplicate transactions using arules package in R

提交回复
热议问题