Search Results for: Meslin seed
.") // seed for mllib als val seed = ap.seed.getorelse(system.nanotime) val m = als.trainimplicit( ratings = mllibratings, rank = ap.rank, iterations = ap.numiterations, lambda = ap.lambda, blocks = -1, alpha = 1.0, seed = seed) new alsmodel( productfeatures = m.productfeatures.collectasmap.tomap, itemstringintmap
= -1) }.reducebykey(_ + _) // aggregate all view events of same user-item pair .map { case ((u, i), v) => // mllibrating requires integer index for user and item mllibrating(u, i, v) } in addition to rdd[mllibrating], als.trainimplicit takes the following parameters: rank, iterations, lambda and seed...
https://predictionio.apache.org/templates/similarproduct/dase/