-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcofire.pb.go
More file actions
243 lines (207 loc) · 7.49 KB
/
Copy pathcofire.pb.go
File metadata and controls
243 lines (207 loc) · 7.49 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cofire.proto
/*
Package cofire is a generated protocol buffer package.
It is generated from these files:
cofire.proto
It has these top-level messages:
Features
Entry
Rating
Message
Update
*/
package cofire
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Stage are the internal stages of the cofire learner.
type Stage int32
const (
Stage_ENTRY Stage = 0
Stage_PRODUCT Stage = 1
Stage_USER Stage = 2
)
var Stage_name = map[int32]string{
0: "ENTRY",
1: "PRODUCT",
2: "USER",
}
var Stage_value = map[string]int32{
"ENTRY": 0,
"PRODUCT": 1,
"USER": 2,
}
func (x Stage) String() string {
return proto.EnumName(Stage_name, int32(x))
}
func (Stage) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// Features are the factors and a bias for a user or product.
type Features struct {
V []float64 `protobuf:"fixed64,1,rep,packed,name=v" json:"v,omitempty"`
Bias float64 `protobuf:"fixed64,2,opt,name=bias" json:"bias,omitempty"`
}
func (m *Features) Reset() { *m = Features{} }
func (m *Features) String() string { return proto.CompactTextString(m) }
func (*Features) ProtoMessage() {}
func (*Features) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Features) GetV() []float64 {
if m != nil {
return m.V
}
return nil
}
func (m *Features) GetBias() float64 {
if m != nil {
return m.Bias
}
return 0
}
// Entry are the factors (either U or P) for a user or product.
type Entry struct {
U *Features `protobuf:"bytes,1,opt,name=u" json:"u,omitempty"`
P *Features `protobuf:"bytes,2,opt,name=p" json:"p,omitempty"`
}
func (m *Entry) Reset() { *m = Entry{} }
func (m *Entry) String() string { return proto.CompactTextString(m) }
func (*Entry) ProtoMessage() {}
func (*Entry) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Entry) GetU() *Features {
if m != nil {
return m.U
}
return nil
}
func (m *Entry) GetP() *Features {
if m != nil {
return m.P
}
return nil
}
// Rating represents the score that a user gives to a product.
// Cofire Learner accepts Rating messages to factorize the rating matrix.
type Rating struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId" json:"product_id,omitempty"`
Score float64 `protobuf:"fixed64,3,opt,name=score" json:"score,omitempty"`
}
func (m *Rating) Reset() { *m = Rating{} }
func (m *Rating) String() string { return proto.CompactTextString(m) }
func (*Rating) ProtoMessage() {}
func (*Rating) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *Rating) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
func (m *Rating) GetProductId() string {
if m != nil {
return m.ProductId
}
return ""
}
func (m *Rating) GetScore() float64 {
if m != nil {
return m.Score
}
return 0
}
// Message are internal messages of the Cofire Learner.
type Message struct {
Stage Stage `protobuf:"varint,1,opt,name=stage,enum=cofire.Stage" json:"stage,omitempty"`
Rating *Rating `protobuf:"bytes,2,opt,name=rating" json:"rating,omitempty"`
F *Features `protobuf:"bytes,3,opt,name=f" json:"f,omitempty"`
Iters uint32 `protobuf:"varint,4,opt,name=iters" json:"iters,omitempty"`
}
func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *Message) GetStage() Stage {
if m != nil {
return m.Stage
}
return Stage_ENTRY
}
func (m *Message) GetRating() *Rating {
if m != nil {
return m.Rating
}
return nil
}
func (m *Message) GetF() *Features {
if m != nil {
return m.F
}
return nil
}
func (m *Message) GetIters() uint32 {
if m != nil {
return m.Iters
}
return 0
}
// Update messages overwrite the U or P features of in the user/product's
// entry.
type Update struct {
U *Features `protobuf:"bytes,1,opt,name=u" json:"u,omitempty"`
P *Features `protobuf:"bytes,2,opt,name=p" json:"p,omitempty"`
}
func (m *Update) Reset() { *m = Update{} }
func (m *Update) String() string { return proto.CompactTextString(m) }
func (*Update) ProtoMessage() {}
func (*Update) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *Update) GetU() *Features {
if m != nil {
return m.U
}
return nil
}
func (m *Update) GetP() *Features {
if m != nil {
return m.P
}
return nil
}
func init() {
proto.RegisterType((*Features)(nil), "cofire.Features")
proto.RegisterType((*Entry)(nil), "cofire.Entry")
proto.RegisterType((*Rating)(nil), "cofire.Rating")
proto.RegisterType((*Message)(nil), "cofire.Message")
proto.RegisterType((*Update)(nil), "cofire.Update")
proto.RegisterEnum("cofire.Stage", Stage_name, Stage_value)
}
func init() { proto.RegisterFile("cofire.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 306 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x91, 0xcd, 0x4e, 0xb3, 0x40,
0x14, 0x86, 0xbf, 0xd3, 0x96, 0x69, 0x7b, 0xfa, 0x13, 0x72, 0xf2, 0x25, 0xb2, 0xd1, 0x10, 0x4c,
0x0c, 0x1a, 0xd3, 0x45, 0xbd, 0x04, 0xad, 0xda, 0x85, 0x3f, 0x99, 0xb6, 0x26, 0xae, 0xcc, 0x14,
0x06, 0xc2, 0xa6, 0x90, 0x99, 0xa1, 0x89, 0xf7, 0xe0, 0x45, 0x9b, 0x19, 0x60, 0xd7, 0x9d, 0x3b,
0xde, 0xf3, 0xc0, 0xcb, 0x73, 0x66, 0x70, 0x9a, 0x94, 0x59, 0xa1, 0xe4, 0xa2, 0x52, 0xa5, 0x29,
0x89, 0x35, 0x29, 0xba, 0xc5, 0xd1, 0xa3, 0x14, 0xa6, 0x56, 0x52, 0xd3, 0x14, 0xe1, 0x18, 0x40,
0xd8, 0x8f, 0x81, 0xc3, 0x91, 0x08, 0x07, 0xfb, 0x42, 0xe8, 0xa0, 0x17, 0x42, 0x0c, 0xdc, 0x3d,
0x47, 0x4f, 0xe8, 0xad, 0x0e, 0x46, 0x7d, 0xd3, 0x05, 0x42, 0x1d, 0x40, 0x08, 0xf1, 0x64, 0xe9,
0x2f, 0xda, 0xe2, 0xae, 0x87, 0x43, 0x6d, 0x79, 0xe5, 0xbe, 0x3c, 0xc9, 0xab, 0xe8, 0x03, 0x19,
0x17, 0xa6, 0x38, 0xe4, 0x74, 0x86, 0xc3, 0x5a, 0x4b, 0xf5, 0x55, 0xa4, 0xae, 0x6f, 0xcc, 0x99,
0x8d, 0xeb, 0x94, 0xce, 0x11, 0x2b, 0x55, 0xa6, 0x75, 0x62, 0x2c, 0xeb, 0x39, 0x36, 0x6e, 0x27,
0xeb, 0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