Skip to content

Collaborative filtering recommendation system. Recommendation algorithm using collaborative filtering. Topics: Ranking algorithm, euclidean distance algorithm, slope one algorithm, filtragem colaborativa.

License

Notifications You must be signed in to change notification settings

tigoCaval/recommendation-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recommendation Algorithm in Go

Collaborative filtering recommendation system in Go:

  • Ranking algorithm using likes/dislikes or numeric ratings.
  • This package can be used in any Go project or module.
  • MIT license. Feel free to use this project. Leave a star ⭐ or make a fork !

If you found this project useful, consider making a donation to support the developer.

paypal
paypal

Getting started

Starting with Go modules:

  1. Install Go (tested with 1.20+)
  2. Download package:
go get github.com/tigoCaval/recommendation-go

Introduction

Recommend products using collaborative filtering:

Example

Simple demonstration of collaborative filtering:

table := []recommendation.Transaction{
    {ProductID: "A", Score: 1, UserID: "John"},
    {ProductID: "B", Score: 1, UserID: "John"},
    {ProductID: "A", Score: 1, UserID: "Mary"},
    {ProductID: "B", Score: 0, UserID: "Mary"},
    {ProductID: "C", Score: 1, UserID: "Mary"},
}

client := recommendation.NewRecommend()

fmt.Println(client.Ranking(table,"John",0))    // map[C:1]
fmt.Println(client.Euclidean(table,"John,0"))  // map[C:1]
fmt.Println(client.SlopeOne(table,"John",0))   // map[C:1.5]

Algorithms

Algorithm Description Output Example
Ranking Simple count-based ranking. Recommends items with the highest score (likes/dislikes). map[C:1]
Euclidean Distance-based similarity. Finds the most similar users and recommends unseen items. map[C:1]
SlopeOne Predictive algorithm. Uses differences between item ratings to estimate unknown preferences. map[C:1.5]

Supporting this project

If you are interested in supporting this project, you can help in many ways. Leave a star ⭐ or make a donation of any value.

Sponsor supporting this project

  • []

Contributors

License

MIT license. See the archive License

About

Collaborative filtering recommendation system. Recommendation algorithm using collaborative filtering. Topics: Ranking algorithm, euclidean distance algorithm, slope one algorithm, filtragem colaborativa.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages