August 2019
Intermediate to advanced
242 pages
5h 45m
English
We are using the GroupLens dataset. It contains a collection of users, movies, and ratings collected from MovieLens (http://www.movielens.org), and is run by a number of academic researchers at the University of Minnesota.
We need to parse the ratings.dat file, delimited with a colon, for userids, ratings, and movieids. We can then match up movieids with those in movies.dat.
First, let's look at the code we need to build our index of movies:
package mainimport ( // "github.com/aotimme/rbm" "fmt" "log" "math" "strconv" "github.com/yunabe/easycsv" g "gorgonia.org/gorgonia" "gorgonia.org/tensor")var datasetfilename string = "dataset/cleanratings.csv"var movieindexfilename string = "dataset/cleanmovies.csv" ...
Read now
Unlock full access