April 2017
Intermediate to advanced
532 pages
12h 39m
English
Once we have extracted these simple features from our raw data, we are ready to proceed with model training; ML takes care of this for us. All we have to do is provide the correctly-parsed input dataset we just created as well as our chosen model parameters.
Split the dataset in to training and testing sets with ratio 80:20, as shown in the following lines of code:
def createALSModel() { val ratings = FeatureExtraction.getFeatures(); val Array(training, test) = ratings.randomSplit(Array(0.8, 0.2)) println(training.first()) }
Read now
Unlock full access