gry1994tistorycom

Untitled

May 31st, 2020
177
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # List the first three rules with the highest lift values
  2. lhss <- inspect(rules)$lhs
  3. rhss <- inspect(rules)$rhs
  4. effi <- inspect(rules)$support * inspect(rules)$confidence * inspect(rules)$lift # 효용성 (순위)
  5.  
  6. rulesMatrix <- matrix(0, length(lhss), 3)
  7. colnames(rulesMatrix) <- c("lhs","rhs","effi")
  8. rulesMatrix[,1] <- lhss
  9. rulesMatrix[,2] <- rhss
  10. rulesMatrix[,3] <- effi
  11. # effi(효용성) 기준으로 정렬
  12. rulesMatrix <- rulesMatrix[order(rulesMatrix[,3]), ]
  13. rulesMatrix
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×