Skip to content

Instantly share code, notes, and snippets.

@danared
Created June 24, 2016 14:40
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/7312633c2866e2a109f6a0baa67c5076 to your computer and use it in GitHub Desktop.
Save danared/7312633c2866e2a109f6a0baa67c5076 to your computer and use it in GitHub Desktop.
package example
import org.apache.log4j.{Level, Logger}
import org.apache.spark.ml.evaluation.RegressionEvaluator
import org.apache.spark.ml.recommendation.ALS
import org.apache.spark.ml.tuning.{ParamGridBuilder, TrainValidationSplit}
import org.apache.spark.sql.SQLContext
import org.apache.spark.{SparkConf, SparkContext}
import com.mongodb.spark.MongoSpark
import com.mongodb.spark.config.{ReadConfig, WriteConfig}
/**
* Represents a Users movie rating
*/
case class UserMovieRating(user_id: Int, movie_id: Int, rating: Double)
object MovieRecommendation {
/**
* Run this main method to see the output of this quick example or copy the code into the spark shell
*
* @param args takes an optional single argument for the connection string
* @throws Throwable if an operation fails
*/
def main(args: Array[String]): Unit = {
}
/**
* Gets or creates the Spark Context
*/
def getSparkContext(): SparkContext = {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment