-
Notifications
You must be signed in to change notification settings - Fork 0
/
product-affinity.cson
55 lines (55 loc) · 1.67 KB
/
product-affinity.cson
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: "Product affinity"
description: "A generic product affinity model"
outputs:
affinity:
veryLow: [0, 25]
low: [0, 25, 50]
medium: [25, 50, 75]
high: [50, 75, 100]
veryHigh: [75, 100]
inputs:
# true if both products have the same category; else false
sameCategory:
false: [-1, 0, 1]
true: [0, 1, 2]
# Absolute value of difference in price between first and
# second product, as percent of price of first product
priceDifferencePercent:
veryLow: [0, 25]
low: [0, 25, 50]
medium: [25, 50, 75]
high: [50, 75, 100]
veryHigh: [75, 100]
# Number of customers who've bought the first product
# that have also bought the second product, as a percentage
# of all customers who have bought the first product
percentSharedCustomers:
veryLow: [0, 25]
low: [0, 25, 50]
medium: [25, 50, 75]
high: [50, 75, 100]
veryHigh: [75, 100]
# Number of words in both product's title as percentage
# of all words in first product's title
percentSharedTitleWords:
veryLow: [0, 25]
low: [0, 25, 50]
medium: [25, 50, 75]
high: [50, 75, 100]
veryHigh: [75, 100]
# Number of words in both product's description as percentage
# of all words in first product's description
percentSharedDescriptionWords:
veryLow: [0, 25]
low: [0, 25, 50]
medium: [25, 50, 75]
high: [50, 75, 100]
veryHigh: [75, 100]
rules: [
"IF sameCategory IS true THEN affinity IS high"
"IF sameCategory IS false THEN affinity IS low"
"priceDifferencePercent DECREASES affinity"
"percentSharedCustomers INCREASES affinity"
"percentSharedTitleWords INCREASES affinity"
"percentSharedDescriptionWords INCREASES affinity"
]