-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonline_hmm.proto
64 lines (53 loc) · 1.8 KB
/
online_hmm.proto
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
56
57
58
59
60
61
option java_package = "com.hello.suripu.api.datascience";
option java_outer_classname = "OnlineHmmProtos";
package hello;
message RealMatrix {
required int32 num_rows = 1;
required int32 num_cols = 2;
repeated double data = 3;
optional string id = 4;
}
//this maps to a interpretation layer factory in the suripu
//if you are going to create a new user model type (i.e. not SLEEP or BED)
//you must update this factory in suripu
enum OutputId {
SLEEP = 0;
BED = 1;
}
message Transition {
required int32 from = 1;
required int32 to = 2;
}
message MotionModelRestriction {
optional string motion_model_id = 1;
repeated Transition forbiddeden_motion_transitions = 2;
repeated int32 non_motion_states = 3;
}
message AlphabetHmmPrior {
optional string id = 1;
optional OutputId output_id = 2;
optional int64 date_created_utc = 3;
optional int64 date_updated_utc = 4;
optional RealMatrix log_state_transition_numerator = 5;
repeated RealMatrix log_observation_model_numerator = 6;
repeated string log_observation_model_ids = 7;
repeated double log_denominator = 8;
repeated double pi = 9;
repeated int32 end_states = 10;
repeated int32 minimum_state_durations = 11;
optional MotionModelRestriction motion_model_restriction = 12; //restricts transitions to only certain states and times
}
message AlphabetHmmScratchPad {
optional int64 last_date_updated_utc = 1;
repeated AlphabetHmmPrior model_deltas = 2;
repeated VotingInfo vote_info = 3;
}
message VotingInfo {
optional string model_id = 1;
optional string output_id = 2;
optional double probability_of_model = 3;
}
message AlphabetHmmUserModel {
repeated AlphabetHmmPrior models = 1;
repeated VotingInfo vote_info = 2; //purposely decoupled from the models
}