Skip to content

Instantly share code, notes, and snippets.

@danared
Created June 24, 2016 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danared/0412235cb3de98ce7d734923ce78092f to your computer and use it in GitHub Desktop.
Save danared/0412235cb3de98ce7d734923ce78092f to your computer and use it in GitHub Desktop.
// Combine the datasets
val userRatings = MongoSpark.load(sc, readConfig.copy(collectionName = "personal_ratings")).toDF[UserMovieRating]
val combinedRatings = movieRatings.unionAll(userRatings)
// Retrain using the combinedRatings
val combinedModel = als.fit(combinedRatings, bestModel.extractParamMap())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment