Table of Contents
This project marks my debut in learning Go, driven by the assignment of the Big Data course I attended in the context of my Master's degree.
The application can either run in CLI mode or start a simple Web UI as described in Compilation & Execution section. The design of the current application models (eg. user, movie, rating etc.) was influenced by the input data sourced from the grouplens latest full dataset as of December 2023. From this point onward, this dataset will be referenced as ml-latest
.
This application is written in Golang v1.21. It was developed in an Ubuntu 22.04 LTS environment.
Optional installations other than Golang are:
- Miniconda
- Hash of image I used:
d0643508fa49105552c94a523529f4474f91730d3e0d1f168f1700c43ae67595
- Hash of image I used:
- Make (
sudo apt install -y make
)
- Place the dataset CSVs in a folder, eg:
./ml-latest
- Example:
tree -d .
. ├── algorithms ├── config ├── helpers ├── ml-latest ├── models ├── preprocess ├── recommenders ├── tests ├── ui │ ├── css │ └── js └── utils
- Example:
-
If you installed miniconda:
conda create --name go --channel conda-forge go=1.21
conda activate go
-
Compile & run each the binaries at once with:
- Preprocess:
go run preprocess/preprocess.go -d ./ml-latest
- Recommender:
go run recommender -n 100 -s cosine -a tag -i 6539
- Note that there is also an optional parameter
-r maxRecords
which limits the dataset depending on the algorithm.- Sample usage:
go run recommender -n 100 -s cosine -a item -i 1 -r 5000
- This uses the first
maxRecords
objects in the dataset, eg. the first 5000 movies with all their ratings in the above case.
- Sample usage:
- Note that there is also an optional parameter
- UI:
go run recommender -u
- Note: Preprocess needs to be executed at least once before recommender to produce the following files:
preprocessed-data ├── movieTitles.gob ├── movies.gob ├── tags.gob └── users.gob
- The optional parameter
maxRecords
can be specified through the UI as well.
- Preprocess:
-
Alternativelly if you want to seperate compilation and execution steps do one of the following:
- If you have make installed you can run
make
which will buildrecommender
andpreprocess/preprocess
binaries - If you don't have make installed, compile with:
- Preprocess:
go build -o preprocess/preprocess preprocess/preprocess.go
- Recommender:
go build -o recommender .
- Preprocess:
- Then execute with:
- Preprocess:
./preprocess/preprocess -d ./ml-latest
- Recommender:
./recommender -n 100 -s cosine -a tag -i 6539
- UI:
./recommender -u
- If you have make installed you can run
You can find the detailed report regarding the implementation of my recommender app in Report.pdf
This project is licensed under the MIT License