Skip to content

Commit 8efe3be

Browse files
committed
readme added to describe history signal. mpm is updated for history elements
1 parent 7231492 commit 8efe3be

File tree

2 files changed

+46
-104
lines changed

2 files changed

+46
-104
lines changed
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Causal_pathway,comparison_size,trend_size,achievement_recency,loss_recency,message_recency,message_recurrence,measure_recency,coachiness
2-
social better,0.5,--,--,--,0.9,0.9,0.5,0
3-
social worse,0.5,--,--,--,0.9,0.5,0.5,1
4-
goal worse,0.5,--,--,--,0.9,0.5,0.5,1
5-
improving,--,0.8,--,--,0.9,0.9,1,0.5
6-
worsening,--,0.8,--,--,0.9,0.5,1,1
7-
social gain,0.5,0.8,0.5,--,0.9,0.9,0.5,0.5
8-
goal gain,0.5,0.8,0.5,--,0.9,0.9,0.5,0.5
9-
social loss,0.5,0.8,--,0.5,0.9,0.5,0.5,1
10-
goal loss,0.5,0.8,--,0.5,0.9,0.5,0.5,1
11-
social approach,0.5,0.8,0.5,--,0.9,0.9,1,1
12-
goal approach,0.5,0.8,0.5,--,0.9,0.9,1,1
2+
social better,0.5,--,--,--,0.1,0.1,0.5,0
3+
social worse,0.5,--,--,--,0.1,0.5,0.5,1
4+
goal worse,0.5,--,--,--,0.1,0.5,0.5,1
5+
improving,--,0.8,--,--,0.1,0.1,0,0.5
6+
worsening,--,0.8,--,--,0.1,0.5,0,1
7+
social gain,0.5,0.8,0.5,--,0.1,0.1,0.5,0.5
8+
goal gain,0.5,0.8,0.5,--,0.1,0.1,0.5,0.5
9+
social loss,0.5,0.8,--,0.5,0.1,0.5,0.5,1
10+
goal loss,0.5,0.8,--,0.5,0.1,0.5,0.5,1
11+
social approach,0.5,0.8,0.5,--,0.1,0.1,0,1
12+
goal approach,0.5,0.8,0.5,--,0.1,0.1,0,1
Lines changed: 35 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,36 @@
11

2-
```python
3-
MPM = {
4-
"social worse": {
5-
"comparison_size": 0.5,
6-
"message_recency": 0.9,
7-
"message_received_count": 0.5,
8-
"measure_recency": 0.5,
9-
"coachiness": 1.0,
10-
},
11-
"social better": {
12-
"comparison_size": 0.5,
13-
"message_recency": 0.9,
14-
"message_received_count": 0.9,
15-
"measure_recency": 0.5,
16-
"coachiness": 0.0,
17-
},
18-
"improving": {
19-
"trend_size": 0.8,
20-
"message_recency": 0.9,
21-
"message_received_count": 0.9,
22-
"measure_recency": 1.0,
23-
"coachiness": 0.5,
24-
},
25-
"worsening": {
26-
"trend_size": 0.8,
27-
"message_recency": 0.9,
28-
"message_received_count": 0.5,
29-
"measure_recency": 1.0,
30-
"coachiness": 1.0,
31-
},
32-
"goal gain": {
33-
"comparison_size": 0.5,
34-
"trend_size": 0.8,
35-
"achievement_recency": 0.5,
36-
"message_recency": 0.9,
37-
"message_received_count": 0.9,
38-
"measure_recency": 0.5,
39-
"coachiness": 0.5,
40-
},
41-
"goal loss": {
42-
"comparison_size": 0.5,
43-
"trend_size": 0.8,
44-
"loss_recency": 0.5,
45-
"message_recency": 0.9,
46-
"message_received_count": 0.5,
47-
"measure_recency": 0.5,
48-
"coachiness": 1.0,
49-
},
50-
"social gain": {
51-
"comparison_size": 0.5,
52-
"trend_size": 0.8,
53-
"achievement_recency": 0.5,
54-
"message_recency": 0.9,
55-
"message_received_count": 0.9,
56-
"measure_recency": 0.5,
57-
"coachiness": 0.5,
58-
},
59-
"social loss": {
60-
"comparison_size": 0.5,
61-
"trend_size": 0.8,
62-
"loss_recency": 0.5,
63-
"message_recency": 0.9,
64-
"message_received_count": 0.5,
65-
"measure_recency": 0.5,
66-
"coachiness": 1.0,
67-
},
68-
"goal worse": {
69-
"comparison_size": 0.5,
70-
"message_recency": 0.9,
71-
"message_received_count": 0.5,
72-
"measure_recency": 0.5,
73-
"coachiness": 1.0,
74-
},
75-
"social approach": {
76-
"comparison_size": 0.5,
77-
"trend_size": 0.8,
78-
"achievement_recency": 0.5,
79-
"message_recency": 0.9,
80-
"message_received_count": 0.9,
81-
"measure_recency": 1.0,
82-
"coachiness": 1.0,
83-
},
84-
"goal approach": {
85-
"comparison_size": 0.5,
86-
"trend_size": 0.8,
87-
"achievement_recency": 0.5,
88-
"message_recency": 0.9,
89-
"message_received_count": 0.9,
90-
"measure_recency": 1.0,
91-
"coachiness": 1.0,
92-
},
93-
}
94-
```
2+
## History
3+
This is an inverse _moderator_ so 0 has the most motivational potential (little or no history), and 1 has the least motivational potential (the message or measure has been selected more often or more recently).
4+
5+
The individual moderators listed below are weighted on a per causal pathway basis using weights from the MPM. The MPM weightings are only relative weightings for different history sub moderators. The history score overall is still an inverse moderator. For example, for the _social better_ pathway:
6+
```
7+
history_score = (message_recurrence * 0.1 + message_recency * 0.1 + measure_recurrence * 0.5) / (0.1 + 0.1 + 0.5)
8+
```
9+
In the above example for the _social better_ example measure recurrence is more important than message recurrence or message recency
10+
11+
`history_score` will be a value between 0 and 1 with 0 being the least history (the most motivational) and 1 being the most history (the least motivational).
12+
13+
Because history is an inverse moderator, the final scoring algorithm incorporates the history score this way:
14+
```
15+
score = motivating_score * 1 + (1 - history_score) * 2 + preferences_score * 1.3
16+
```
17+
18+
### message_recurrence (0-1, 1 is most history = least motivational potentional)
19+
The _signal property_ is the number of times the candidate message has been selected in the last 12 month. Actual data may not contain all month. This is just a simple count.
20+
21+
The _moderator_ is the count devided by 12. 0 is no recurrence and 1 is 12 messages in the last year.
22+
23+
### message_recency (0-1, 1 is most recent history = least motivational potentional)
24+
The _signal property_ is the number of month since the last time this candidate message was selected.
25+
26+
The _moderator_ is 1 minus the count, devided by 12. 1 is message was sent most recently, and 0 is the message has not been sent in the last year.
27+
28+
### measure_recurrence (0-1, 1 is most history = least motivational potentional)
29+
The _signal property_ is the number of times a message for this candidate's measure has been selected in the last 12 month. Actual data may not contain all month. This is just a simple count.
30+
31+
The _moderator_ is the count devided by 12. 0 is no recurrence and 1 is 12 messages with the same measure in the last year.
32+
33+
### measure_recency (0-1, 1 is most recent history = least motivational potentional)
34+
The _signal property_ is the number of month since the last time a message for this candidate's measure has been selected.
35+
36+
The _moderator_ is 1 minus the count, devided by 12. 1 is a message with this measure was sent most recently, and 0 is a message with this measure has not been sent in the last year.

0 commit comments

Comments
 (0)