Documentation ¶
Overview ¶
Package vectormodel provides primitives for serving Matrix Factorization based Recommender System models. We assume that the document vectors were calculated according to the paper "Collaborative Filtering for Implicit Feedback Datasets". Given the document vectors and the list of documents consumed by a user, this package can calculate the user vectors in realtime to generate recommendations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentScore ¶
DocumentScore is the result of a recommendation
type VectorModel ¶
type VectorModel struct {
// contains filtered or unexported fields
}
VectorModel is a struct to handle document vector space models.
func NewVectorModel ¶
func NewVectorModel(documents map[int][]float64, confidence, regularization float64) (*VectorModel, error)
NewVectorModel creates a new VectorModel
func (*VectorModel) Recommend ¶
func (vm *VectorModel) Recommend(seenDocs map[int]bool, n int) (recommendations []DocumentScore, err error)
Recommend returns a list of recommendedDocs and a list of scores
Click to show internal directories.
Click to hide internal directories.