Documentation ¶
Index ¶
- Constants
- type Feedback
- type LocalCache
- type Master
- func (m *Master) AnalyzeLoop()
- func (m *Master) CreateWebService()
- func (m *Master) FitLoop()
- func (m *Master) GetClickModel(context.Context, *protocol.NodeInfo) (*protocol.Model, error)
- func (m *Master) GetMeta(ctx context.Context, nodeInfo *protocol.NodeInfo) (*protocol.Meta, error)
- func (m *Master) GetRankingModel(context.Context, *protocol.NodeInfo) (*protocol.Model, error)
- func (m *Master) GetUserIndex(context.Context, *protocol.NodeInfo) (*protocol.UserIndex, error)
- func (m *Master) SearchLoop()
- func (m *Master) Serve()
- func (m *Master) StartHttpServer()
- type Node
- type SinglePageAppFileSystem
- type Status
- type User
- type UserIterator
Constants ¶
View Source
const ( RankingTop10NDCG = "NDCG@10" RankingTop10Precision = "Precision@10" RankingTop10Recall = "Recall@10" ClickPrecision = "Precision" ClickThroughRate = "ClickThroughRate" ActiveUsersYesterday = "ActiveUsersYesterday" ActiveUsersMonthly = "ActiveUsersMonthly" )
View Source
const ( ServerNode = "Server" WorkerNode = "Worker" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalCache ¶
type LocalCache struct { RankingModelName string RankingModelVersion int64 RankingModel ranking.Model RankingModelScore ranking.Score UserIndexVersion int64 UserIndex base.Index ClickModelVersion int64 ClickModelScore click.Score ClickModel click.FactorizationMachine // contains filtered or unexported fields }
LocalCache is local cache for the master node.
func LoadLocalCache ¶
func LoadLocalCache(path string) (*LocalCache, error)
LoadLocalCache loads local cache from a file. If the ranking model is invalid, RankingModel == nil. If the click model is invalid, ClickModel == nil.
func (*LocalCache) WriteLocalCache ¶
func (c *LocalCache) WriteLocalCache() error
WriteLocalCache writes local cache to a file.
type Master ¶
type Master struct { protocol.UnimplementedMasterServer server.RestServer // contains filtered or unexported fields }
Master is the master node.
func (*Master) AnalyzeLoop ¶ added in v0.2.1
func (m *Master) AnalyzeLoop()
func (*Master) CreateWebService ¶
func (m *Master) CreateWebService()
func (*Master) GetClickModel ¶ added in v0.2.2
GetClickModel returns latest click model.
func (*Master) GetRankingModel ¶
GetRankingModel returns latest ranking model.
func (*Master) GetUserIndex ¶
GetUserIndex returns latest user index.
func (*Master) SearchLoop ¶
func (m *Master) SearchLoop()
SearchLoop searches optimal recommendation model in background. It never modifies variables other than rankingModelSearcher, clickSearchedModel and clickSearchedScore.
func (*Master) StartHttpServer ¶
func (m *Master) StartHttpServer()
type SinglePageAppFileSystem ¶
type SinglePageAppFileSystem struct {
// contains filtered or unexported fields
}
SinglePageAppFileSystem is the file system for single page app.
type UserIterator ¶
Click to show internal directories.
Click to hide internal directories.