Skip to content

Commit fd7c48c

Browse files
author
Kenneth Chan
committed
change to sort by confidence instead of lift score and change default parameter values
1 parent e4212ae commit fd7c48c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Please refer to http://docs.prediction.io/templates/complementarypurchase/quicks
66

77
## Versions
88

9+
### v0.3.3
10+
11+
- change to sort by confidence instead of lift score and change default parameter values
12+
913
### v0.3.2
1014

1115
- lower the default minSupport and minConfidence parameter setting

engine.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"params": {
1414
"basketWindow" : 120,
1515
"maxRuleLength" : 2,
16-
"minSupport": 0.05,
17-
"minConfidence": 0.2,
16+
"minSupport": 0.001,
17+
"minConfidence": 0.1,
1818
"minLift" : 1.0,
1919
"minBasketSize" : 2,
2020
"maxNumRulesPerCond": 5

src/main/scala/Algorithm.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class Algorithm(val ap: AlgorithmParams)
108108
val sortedRules = rules.groupByKey
109109
.mapValues(iter =>
110110
iter.toVector
111-
.sortBy(_.lift)(Ordering.Double.reverse)
111+
.sortBy(_.confidence)(Ordering.Double.reverse)
112112
.take(ap.maxNumRulesPerCond)
113113
)
114114
.collectAsMap.toMap

0 commit comments

Comments
 (0)