arnaucube
arnaucube/goRecommenderPublic Self-hosted repository
goRecommender/mongodbModels.go
mongodbModels.goRaw
 1package main
 2
 3type UserModel struct {
 4	ID  string `json:"id"`
 5	Age int    `json:",string"`
 6	//age clusters: a<20 (0), 20<a<40 (1), 40<a<60 (2), 60<a (3)
 7	AgeCluster int
 8	Actions    []string
 9}
10type ItemModel struct {
11	ID           string
12	TRecommended int
13	TActed       int
14	TScored      int //times acted from recommendation
15}
16
17var scores []float64
18var ranking []ItemModel