Created
April 19, 2017 20:33
-
-
Save josep2/ec1b22b59a1ea6ef7821bb9dbd14142e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Start your Livy server: https://github.com/cloudera/livy#prerequisites | |
// First step is I instantiate a Spark Session and create a function that square in the spark shell and leave it open | |
val sparkSession = SparkSession.builder | |
.master("local[1]") | |
.appName("app_1") | |
.getOrCreate() | |
def predictMyWeight(weight: Int, calories: Int ): Double = { | |
185 + .005*weight -*002*calories // Don't make fun of my default weight | |
} | |
--------------------------------------------------------------------------------------------------------------------------- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment