Documentation ¶
Index ¶
- Constants
- func LoadColdStartRankConfig(config *recconf.RecommendConfig)
- func RegisterRank(sceneName string, ranks ...IRank)
- func SetBoostFunc(bf boostFunc)
- type AlgoData
- type AlgoDataBase
- type AlgoDataGenerator
- func (g *AlgoDataGenerator) AddFeatures(item *module.Item, itemFeatures map[string]interface{}, ...)
- func (g *AlgoDataGenerator) GeneratorAlgoData() IAlgoData
- func (g *AlgoDataGenerator) GeneratorAlgoDataDebug() IAlgoData
- func (g *AlgoDataGenerator) GeneratorAlgoDataDebugWithLevel(level int) IAlgoData
- func (g *AlgoDataGenerator) HasFeatures() bool
- type ColdStartRank
- type EasyrecAlgoData
- type EasyrecAlgoDataGenerator
- func (g *EasyrecAlgoDataGenerator) AddFeatures(item *module.Item, itemFeatures map[string]interface{}, ...)
- func (g *EasyrecAlgoDataGenerator) GeneratorAlgoData() IAlgoData
- func (g *EasyrecAlgoDataGenerator) GeneratorAlgoDataDebug() IAlgoData
- func (g *EasyrecAlgoDataGenerator) GeneratorAlgoDataDebugWithLevel(level int) IAlgoData
- func (g *EasyrecAlgoDataGenerator) HasFeatures() bool
- type FeatureConsistencyJobService
- type IAlgoData
- type IAlgoDataGenerator
- type IRank
- type RankService
Constants ¶
View Source
const ( DssmO2o = "dssm_o2o" MindO2o = "mind_o2o" )
Variables ¶
This section is empty.
Functions ¶
func LoadColdStartRankConfig ¶
func LoadColdStartRankConfig(config *recconf.RecommendConfig)
func RegisterRank ¶
func SetBoostFunc ¶
func SetBoostFunc(bf boostFunc)
Types ¶
type AlgoData ¶
type AlgoData struct { *AlgoDataBase RequestData []map[string]interface{} }
func (*AlgoData) GetFeatures ¶
func (d *AlgoData) GetFeatures() interface{}
type AlgoDataBase ¶
type AlgoDataBase struct { Items []*module.Item // RequestData []map[string]interface{} AlgoResult map[string][]response.AlgoResponse Err error Mutex sync.Mutex }
func (*AlgoDataBase) Error ¶
func (a *AlgoDataBase) Error() error
func (*AlgoDataBase) GetAlgoResult ¶
func (a *AlgoDataBase) GetAlgoResult() map[string][]response.AlgoResponse
func (*AlgoDataBase) GetItems ¶
func (a *AlgoDataBase) GetItems() []*module.Item
func (*AlgoDataBase) SetAlgoResult ¶
func (a *AlgoDataBase) SetAlgoResult(algoName string, results []response.AlgoResponse)
func (*AlgoDataBase) SetError ¶
func (a *AlgoDataBase) SetError(err error)
type AlgoDataGenerator ¶
type AlgoDataGenerator struct {
// contains filtered or unexported fields
}
func NewAlgoDataGenerator ¶
func NewAlgoDataGenerator() *AlgoDataGenerator
func (*AlgoDataGenerator) AddFeatures ¶
func (g *AlgoDataGenerator) AddFeatures(item *module.Item, itemFeatures map[string]interface{}, userFeatures map[string]interface{})
func (*AlgoDataGenerator) GeneratorAlgoData ¶
func (g *AlgoDataGenerator) GeneratorAlgoData() IAlgoData
func (*AlgoDataGenerator) GeneratorAlgoDataDebug ¶
func (g *AlgoDataGenerator) GeneratorAlgoDataDebug() IAlgoData
func (*AlgoDataGenerator) GeneratorAlgoDataDebugWithLevel ¶
func (g *AlgoDataGenerator) GeneratorAlgoDataDebugWithLevel(level int) IAlgoData
func (*AlgoDataGenerator) HasFeatures ¶
func (g *AlgoDataGenerator) HasFeatures() bool
type ColdStartRank ¶
func NewColdStartRank ¶
func NewColdStartRank(conf *recconf.ColdStartRankConfig) *ColdStartRank
func (*ColdStartRank) Filter ¶
func (r *ColdStartRank) Filter(User *module.User, item *module.Item, context *context.RecommendContext) bool
func (*ColdStartRank) Rank ¶
func (r *ColdStartRank) Rank(user *module.User, items []*module.Item, requestData []map[string]interface{}, context *context.RecommendContext)
type EasyrecAlgoData ¶
type EasyrecAlgoData struct { *AlgoDataBase // contains filtered or unexported fields }
func (*EasyrecAlgoData) GetFeatures ¶
func (d *EasyrecAlgoData) GetFeatures() interface{}
type EasyrecAlgoDataGenerator ¶
type EasyrecAlgoDataGenerator struct {
// contains filtered or unexported fields
}
func NewEasyrecAlgoDataGenerator ¶
func NewEasyrecAlgoDataGenerator(contextFeatures []string) *EasyrecAlgoDataGenerator
func (*EasyrecAlgoDataGenerator) AddFeatures ¶
func (g *EasyrecAlgoDataGenerator) AddFeatures(item *module.Item, itemFeatures map[string]interface{}, userFeatures map[string]interface{})
func (*EasyrecAlgoDataGenerator) GeneratorAlgoData ¶
func (g *EasyrecAlgoDataGenerator) GeneratorAlgoData() IAlgoData
func (*EasyrecAlgoDataGenerator) GeneratorAlgoDataDebug ¶
func (g *EasyrecAlgoDataGenerator) GeneratorAlgoDataDebug() IAlgoData
func (*EasyrecAlgoDataGenerator) GeneratorAlgoDataDebugWithLevel ¶
func (g *EasyrecAlgoDataGenerator) GeneratorAlgoDataDebugWithLevel(level int) IAlgoData
func (*EasyrecAlgoDataGenerator) HasFeatures ¶
func (g *EasyrecAlgoDataGenerator) HasFeatures() bool
type FeatureConsistencyJobService ¶
type FeatureConsistencyJobService struct {
// contains filtered or unexported fields
}
func (*FeatureConsistencyJobService) LogRankResult ¶
func (r *FeatureConsistencyJobService) LogRankResult(user *module.User, items []*module.Item, context *context.RecommendContext)
func (*FeatureConsistencyJobService) LogRecallResult ¶
func (r *FeatureConsistencyJobService) LogRecallResult(user *module.User, items []*module.Item, context *context.RecommendContext, triggerType, userEmbedding, triggerItem, recallAlgo, recallAlgoType, beName, bizName, recallName string)
type IAlgoData ¶
type IAlgoData interface { GetFeatures() interface{} SetError(err error) Error() error GetItems() []*module.Item GetAlgoResult() map[string][]response.AlgoResponse SetAlgoResult(algoName string, results []response.AlgoResponse) }
type IAlgoDataGenerator ¶
type IAlgoDataGenerator interface { AddFeatures(item *module.Item, itemFeatures map[string]interface{}, userFeatures map[string]interface{}) GeneratorAlgoData() IAlgoData // GeneratorAlgoDataDebug generator algo data with debug mode GeneratorAlgoDataDebug() IAlgoData GeneratorAlgoDataDebugWithLevel(level int) IAlgoData HasFeatures() bool }
func CreateAlgoDataGenerator ¶
func CreateAlgoDataGenerator(processor string, contextFeatures []string) IAlgoDataGenerator
type RankService ¶
type RankService struct {
// contains filtered or unexported fields
}
func DefaultRankService ¶
func DefaultRankService() *RankService
func NewRankService ¶
func NewRankService() *RankService
func (*RankService) AddRanks ¶
func (r *RankService) AddRanks(sceneName string, ranks ...IRank)
func (*RankService) GetRanks ¶
func (r *RankService) GetRanks(sceneName string, context *context.RecommendContext) (ret []IRank)
func (*RankService) Rank ¶
func (r *RankService) Rank(user *module.User, items []*module.Item, context *context.RecommendContext)
Click to show internal directories.
Click to hide internal directories.