Documentation ¶
Overview ¶
Bayesian Filter collaborative filtering in Go
Index ¶
- Variables
- func BayesianFilter(mat *DenseMatrix, user, item int) (preds []float64, max int, err error)
- func LaplaceSmoother(count, countUser int) float64
- func MakeRatingMatrix(ratings []float64, rows, cols int) *DenseMatrix
- func NumOccurences(row []float64, val float64) int
- func PercentOccurences(row []float64, val float64) (percent float64)
- func Prod(values []float64) float64
- func ToMap(col []float64) map[float64]float64
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ClassSet = []int{1, 2, 3, 4, 5} NA = m.NaN() )
Functions ¶
func BayesianFilter ¶
/ Bayesian filter recommendation returns rating for a given user, item pair. Returns predictions, the index of the max prediction and an error if required.
func LaplaceSmoother ¶
Laplace smoother for the bayesian filter.
func MakeRatingMatrix ¶
returns the matrix of ratings.
func NumOccurences ¶
returns the # of occurences a value occured in a vector.
func PercentOccurences ¶
returns the % a value occured in a vector.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.