Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val clicks = loadUserItem(site, args.datasetSize(), DateTime.now())
- // The item space here is always going to be small. Shooting it across the network will be slow. So I keep it local.
- val items_stats = clicks.groupBy(i => i._2).map(i => i._1 -> i._2.toList.distinct.size.toDouble).collect().toMap
- val update_clicks = clicks.map(click => (click._1, click._2, items_stats.get(click._2))).filter(entry => entry._3.getOrElse(0d) > 25d).map(entry =>entry._1 -> entry._2 )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement