This repository has been archived by the owner on Jul 22, 2021. It is now read-only.
forked from dvaccari/taylorfit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprotocol.txt
74 lines (65 loc) · 1.93 KB
/
protocol.txt
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
##############
## Protocol ##
##############
[client] | [server]
======================================================
import data
|
choose parameters (exponents & multiplicands)
|
send to server > get data
|
compute terms
|
for each term, compute the potential model (& fit statistics)
|
get terms & stats < report back to client
|
{loop}
client picks term > add term to model
|
compute model & fit stats for model
|
compute new terms (excluding the added one, using the new matrix)
|
get model & terms < report model & new terms back to client
{/loop}
###################
## Data Contract ##
###################
NOTE: For now, this is only considering the creation of a new model
data format (interface -> engine):
{
data : [ [ number, number, ... m],
[ number, number, ... m],
... n
],
exponents : [ number, number, ... ],
multiplicands : [ number, number, ... ]
}
data format (engine -> interface):
{
model: {
terms : [ Term, ... k ],
weights : [ number, ... k],
stats : {
t: [ number, ... k]
mse: number,
... other stats ...
}
},
terms: [
{
term : Term,
stats : {
t: number,
... other stats ...
}
},
...
]
}
Term: [ [ column1, exponent1 ], [ column2, exponent2 ], ... ]
Notes:
- Model persists throughout session
- This is a lot of computation, might want to return intermediate results