-
Notifications
You must be signed in to change notification settings - Fork 0
/
t.ml
153 lines (115 loc) · 3.98 KB
/
t.ml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
open Batteries_uni
open H
open Graph
(* general *)
type ints = int list
type 'a tuple4 = 'a * 'a * 'a * 'a
(* basis *)
type user_int_hash = (user,int) H.t
(* synonyms *)
type dreps = graph
(* by_day *)
type user_user = (user,reps) H.t
type days = (user_user * user_user) array
type int_int = int * int
type int_int_pair = int_int * int_int
type denums = (user * int_int) array
type user_nums = (user, int_int) H.t
type user_nums_pair = user_nums * user_nums
type day_rep_nums = user_nums array
type day_re_me = day_rep_nums * day_rep_nums
type day_edgenums = user_nums_pair array
type user_int = user * int
type user_ints_enum = user_int E.t
type day_user_ints = user_int_hash array
type day_user_nums = user_nums array
type real = float
type day_real = day * float
type day_reals = day_real list
type user_day_reals = (user, day_reals) H.t
type user_reals = (user, real) H.t
type day_user_reals = user_reals array
(* topsets *)
module S=Set.StringSet
let floatSize = S.cardinal |- float
module IS=Set.IntSet
let floatSizeIS = IS.cardinal |- float
(* FYI, (float list) list <=> float list list *)
type rates = (float list) list
type user_set = S.t
type buckets = user_set list
type day_buckets = buckets array
type rbucks = day_buckets
(* cranks *)
type rank = int
type users = user list
type rank_users = users list
type day_rank_users = rank_users array
type day_ranks = (day * rank) list
type user_day_ranks = (user, day_ranks) H.t
type ranked_users = users E.t
(* dcaps *)
type cap = float
type caps = cap list
type day_caps = caps array
type user_caps_list = (user * cap) list
type user_caps_array = (user * cap) array
type day_user_caps = user_caps_array array
type log_buckets = (float * int) list
type day_log_buckets = log_buckets array
(* dreps *)
type daily_ints = (user,(int,int) H.t) H.t
type users_total = user_int_hash
type pair_totals = (user, users_total) H.t
(* dranges *)
type starts = users array
(* volume *)
type bucket_volumes = ints array
type bucket_volumes2 = (int_int list) array
type bucket_volumes4 = (int_int_pair list) array
(* soc_run *)
type dcaps = (user, (int * float) list) H.t
type skew = float list
type dskews = (user, (int * skew) list) H.t
type talk_balance = user_int_hash
type terms_stat = (float * float * float) option
(* bucket power *)
type staying = user_int array array
type staying_totals = int array
type b2b = ints list (* same as int_rates *)
type day_b2b = b2b array
type int_rates = ints list (* TODO rename as: int_table *)
type float3 = float * float * float
type float4 = float * float * float * float
type rates4 = rates * rates * rates * rates
type bucket_numbers = int list
type buckno = bucket_numbers option
(* starrank *)
type dcaps_hash = (user,(day,float) H.t) H.t
type starts_hash = (user,day) H.t
type srank = float3
type starrank = (user, (day * srank) list) H.t
type starrank_hash = (user,(day,srank) H.t) H.t
type starbucks = (float3 * float3) list (* averages * medians *)
type day_starbucks = starbucks array
(* proportional *)
type 'a proportions = user array * 'a array
type int_proportions = int proportions
type float_proportions = float proportions
(* fof *)
type udegr = user_int_hash
type fnums = user_int_hash
type fnofs = (user,int_proportions) H.t
type fsocs = (user,float_proportions) H.t
(* moving *)
type bucket_pos = int
type bucket_track = (bucket_pos * int) list
type bucket_moves = { sinceBM : day; trackBM: bucket_track }
type moving = (user, bucket_moves) H.t
type moving_ranks = (int * user_set) array
(* Kendall Tau C *)
type big_float = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array1.t
type tau = float
type day_taus = tau array
type tau_bucks = tau list
type day_tau_bucks = tau_bucks array (* tau list array *)