Documentation ¶
Index ¶
- type Redrec
- func (rr *Redrec) BatchUpdateSimilarUsers(max int) error
- func (rr *Redrec) CalcItemProbability(user string, item string) (float64, error)
- func (rr *Redrec) CloseConn()
- func (rr *Redrec) GetUserSuggestions(user string, max int) ([]string, error)
- func (rr *Redrec) Rate(item string, user string, score float64) error
- func (rr *Redrec) UpdateSuggestedItems(user string, max int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redrec ¶
type Redrec struct {
// contains filtered or unexported fields
}
Redrec struct
func (*Redrec) BatchUpdateSimilarUsers ¶
BatchUpdateSimilarUsers runs on all the users, getting the similarity candidates for each user and storing the similar users and scores in a sorted set
func (*Redrec) CalcItemProbability ¶
CalcItemProbability takes all the user`s similars that rated the input item and calculates the average score.
func (*Redrec) GetUserSuggestions ¶
GetUserSuggestions return the existing user suggestions range for a given user as a []string
Click to show internal directories.
Click to hide internal directories.