Created
May 16, 2018 15:19
-
-
Save kaysush/c6e72501b0be755b4ed475b4c63ad6a0 to your computer and use it in GitHub Desktop.
Splitting dataset into training and Test set
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
val splits = df.randomSplit(Array(0.8, 0.2), seed = 1234L) | |
val train = splits(0) | |
val test = splits(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment