Skip to content

Commit

Permalink
test for rules without quality measures.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhahsler committed May 15, 2020
1 parent 0140f05 commit 02814b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testthat/test-interestMeasures.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ rules <- apriori(trans, parameter=list(supp=0.01, conf = 0.5),
## calculate all measures (just to see if one creates an error)
m1 <- interestMeasure(rules, transactions = trans)

## ruleset without quality data.frame
rules2 <- rules
quality(rules2) <- quality(rules)[,0]
mr2 <- interestMeasure(rules2, transactions = trans)

## check if single rule returns a single row
m2 <- interestMeasure(rules[1], transactions = trans)
expect_equal(nrow(m2), 1L)
Expand Down

0 comments on commit 02814b7

Please sign in to comment.