userpref

package
v0.0.0-...-476b611 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoInputData = errors.New("no personalization input data")

Functions

func AddTo

func AddTo(c *gin.Context, k *Personalization)

func ReadMatrices

func ReadMatrices(ctx context.Context, q *db.Queries) personalizationMatrices

Types

type Personalization

type Personalization struct {
	Mu sync.RWMutex
	// contains filtered or unexported fields
}

func For

func NewPersonalization

func NewPersonalization(ctx context.Context, q *db.Queries, c *storage.Client) *Personalization

func (*Personalization) Loop

func (k *Personalization) Loop(ctx context.Context, ticker *time.Ticker)

Loop is the main event loop that updates the personalization matrices

func (*Personalization) RelevanceTo

func (p *Personalization) RelevanceTo(userID persist.DBID, e db.FeedEntityScore) float64

Jump to

Keyboard shortcuts

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