April 2017
Intermediate to advanced
532 pages
12h 39m
English
Spark ML provides a convenient computeCost function to compute the WSSS objective function given a DataFrame. We will compute this metric for the following item and user training data:
val WSSSEUsers = modelUsers.computeCost(datasetUsers) println(s"Users : Within Set Sum of Squared Errors = $WSSSEUsers") val WSSSEItems = modelItems.computeCost(datasetItems) println(s"Items : Within Set Sum of Squared Errors = $WSSSEItems")
This should output the result similar to the following one:
Users : Within Set Sum of Squared Errors = 2261.3086181660324Items : Within Set Sum of Squared Errors = 5647.825222497311
The best way to measure effectiveness of WSSSE is to plot against iterations as ...
Read now
Unlock full access