Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultipleRecommendation ¶
type MultipleRecommendation struct { Index int `json:"-"` Recommendation []float64 `json:"recommendation"` Distance float64 `json:"distance"` DistanceMeasure vm.Distance `json:"-"` }
func (MultipleRecommendation) GetDistance ¶
func (r MultipleRecommendation) GetDistance() float64
func (MultipleRecommendation) GetRecommendation ¶
func (r MultipleRecommendation) GetRecommendation() []float64
func (MultipleRecommendation) String ¶
func (r MultipleRecommendation) String() string
type NeighborhoodBasedRecommender ¶
type NeighborhoodBasedRecommender struct {
// contains filtered or unexported fields
}
NeighborhoodBasedRecommender is a recommender system implemented using k-nearest neighbors
func NewNeighborhoodBasedRecommender ¶
func NewNeighborhoodBasedRecommender(data [][]float64, k int) *NeighborhoodBasedRecommender
NewNeighborhoodBasedRecommender creates a new NeighborhoodBasedRecommender object
func (*NeighborhoodBasedRecommender) Recommend ¶
func (nbr *NeighborhoodBasedRecommender) Recommend(items []float64, distanceMeasure vm.Distance, intercept, shuffle, serendipitous bool) ([]Recommendation, error)
Recommend recommends the n number of items that are closer to a given vector using a given distance measure
type Recommendation ¶
type SerendipitousRecommendation ¶
type SerendipitousRecommendation struct { Recommendation []float64 `json:"recommendation"` DistanceMeasure vm.Distance `json:"-"` }
func (SerendipitousRecommendation) GetDistance ¶
func (r SerendipitousRecommendation) GetDistance() float64
func (SerendipitousRecommendation) GetRecommendation ¶
func (r SerendipitousRecommendation) GetRecommendation() []float64
func (SerendipitousRecommendation) String ¶
func (r SerendipitousRecommendation) String() string
type SingleRecommendation ¶
type SingleRecommendation struct { Recommendation []float64 `json:"recommendation"` DistanceMeasure vm.Distance `json:"-"` }
func (SingleRecommendation) GetDistance ¶
func (r SingleRecommendation) GetDistance() float64
func (SingleRecommendation) GetRecommendation ¶
func (r SingleRecommendation) GetRecommendation() []float64
func (SingleRecommendation) String ¶
func (r SingleRecommendation) String() string
Click to show internal directories.
Click to hide internal directories.