Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # List the first three rules with the highest lift values
- lhss <- inspect(rules)$lhs
- rhss <- inspect(rules)$rhs
- effi <- inspect(rules)$support * inspect(rules)$confidence * inspect(rules)$lift # 효용성 (순위)
- rulesMatrix <- matrix(0, length(lhss), 3)
- colnames(rulesMatrix) <- c("lhs","rhs","effi")
- rulesMatrix[,1] <- lhss
- rulesMatrix[,2] <- rhss
- rulesMatrix[,3] <- effi
- # effi(효용성) 기준으로 정렬
- rulesMatrix <- rulesMatrix[order(rulesMatrix[,3]), ]
- rulesMatrix
Add Comment
Please, Sign In to add comment