pipeline

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPipelineConfigs

func LoadPipelineConfigs(conf *recconf.RecommendConfig)

func Recommend

func Recommend(user *module.User, context *context.RecommendContext, debugService *debug.DebugService) (ret []*module.Item)

Types

type ColdStartRankService

type ColdStartRankService struct {
	// contains filtered or unexported fields
}

func NewColdStartRankService

func NewColdStartRankService(config *recconf.PipelineConfig) *ColdStartRankService

func (*ColdStartRankService) GetColdStartRankByContext

func (s *ColdStartRankService) GetColdStartRankByContext(context *context.RecommendContext) *rank.ColdStartRank

func (*ColdStartRankService) Rank

func (s *ColdStartRankService) Rank(user *module.User, items []*module.Item, context *context.RecommendContext)

type FeatureService

type FeatureService struct {
	// contains filtered or unexported fields
}

func NewFeatureService

func NewFeatureService(config *recconf.PipelineConfig) *FeatureService

func (*FeatureService) GetFeatureServiceByContext

func (fs *FeatureService) GetFeatureServiceByContext(context *context.RecommendContext) *feature.FeatureService

func (*FeatureService) LoadFeatures

func (fs *FeatureService) LoadFeatures(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item

type FilterService

type FilterService struct {
	// contains filtered or unexported fields
}

func NewFilterService

func NewFilterService(config *recconf.PipelineConfig) *FilterService

func (*FilterService) Filter

func (fs *FilterService) Filter(filterData *filter.FilterData)

type GeneralRank

type GeneralRank struct {
	*general_rank.BaseGeneralRank
}

func NewGeneralRankWithConfig

func NewGeneralRankWithConfig(scene string, config recconf.GeneralRankConfig) (*GeneralRank, error)

func (*GeneralRank) Rank

func (r *GeneralRank) Rank(user *module.User, items []*module.Item, context *context.RecommendContext, pipeline string) (ret []*module.Item)

type GeneralRankService

type GeneralRankService struct {
	// contains filtered or unexported fields
}

func NewGeneralRankService

func NewGeneralRankService(config *recconf.PipelineConfig) *GeneralRankService

func (*GeneralRankService) AddGeneralRank

func (r *GeneralRankService) AddGeneralRank(rankId string, rank *GeneralRank)

func (*GeneralRankService) Clear

func (r *GeneralRankService) Clear()

func (*GeneralRankService) GetGeneralRank

func (r *GeneralRankService) GetGeneralRank(rankId string) (*GeneralRank, bool)

func (*GeneralRankService) GetGeneralRankByContext

func (r *GeneralRankService) GetGeneralRankByContext(context *context.RecommendContext) *GeneralRank

GetGeneralRank return the GeneralRank by the context If not found, return nil

func (*GeneralRankService) Rank

func (r *GeneralRankService) Rank(user *module.User, items []*module.Item, context *context.RecommendContext) (ret []*module.Item)

type PipelineService

type PipelineService struct {
	// contains filtered or unexported fields
}

func NewPipelineService

func NewPipelineService() *PipelineService

type RankService

type RankService struct {
	// contains filtered or unexported fields
}

func NewRankService

func NewRankService(config *recconf.PipelineConfig) *RankService

func (*RankService) Rank

func (r *RankService) Rank(user *module.User, items []*module.Item, context *context.RecommendContext)

type RecallService

type RecallService struct {
	// contains filtered or unexported fields
}

func NewRecallService

func NewRecallService(config *recconf.PipelineConfig) *RecallService

func (*RecallService) GetItems

func (s *RecallService) GetItems(user *module.User, context *context.RecommendContext) (ret []*module.Item)

type SortService

type SortService struct {
	// contains filtered or unexported fields
}

func NewSortService

func NewSortService(config *recconf.PipelineConfig) *SortService

func (*SortService) Sort

func (ss *SortService) Sort(sortData *sort.SortData)

type UserRecommendService

type UserRecommendService struct {
	// contains filtered or unexported fields
}

func NewUserRecommendService

func NewUserRecommendService(config *recconf.PipelineConfig) *UserRecommendService

func (*UserRecommendService) Filter

func (s *UserRecommendService) Filter(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item

func (*UserRecommendService) Recommend

func (r *UserRecommendService) Recommend(user *module.User, context *context.RecommendContext, debugService *debug.DebugService) []*module.Item

func (*UserRecommendService) Sort

func (s *UserRecommendService) Sort(user *module.User, items []*module.Item, context *context.RecommendContext) []*module.Item

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL