{"action":"opened","issue":{"url":"https://api.github.com/repos/PredictionIO/template-scala-parallel-similarproduct/issues/9","repository_url":"https://api.github.com/repos/PredictionIO/template-scala-parallel-similarproduct","labels_url":"https://api.github.com/repos/PredictionIO/template-scala-parallel-similarproduct/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/PredictionIO/template-scala-parallel-similarproduct/issues/9/comments","events_url":"https://api.github.com/repos/PredictionIO/template-scala-parallel-similarproduct/issues/9/events","html_url":"https://github.com/PredictionIO/template-scala-parallel-similarproduct/issues/9","id":144586577,"number":9,"title":"Aggregating view events in ALSAlgorithm.scala rather than DataSource.scala","user":{"login":"alex9311","id":1326899,"avatar_url":"https://avatars.githubusercontent.com/u/1326899?v=3","gravatar_id":"","url":"https://api.github.com/users/alex9311","html_url":"https://github.com/alex9311","followers_url":"https://api.github.com/users/alex9311/followers","following_url":"https://api.github.com/users/alex9311/following{/other_user}","gists_url":"https://api.github.com/users/alex9311/gists{/gist_id}","starred_url":"https://api.github.com/users/alex9311/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex9311/subscriptions","organizations_url":"https://api.github.com/users/alex9311/orgs","repos_url":"https://api.github.com/users/alex9311/repos","events_url":"https://api.github.com/users/alex9311/events{/privacy}","received_events_url":"https://api.github.com/users/alex9311/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-30T13:14:58Z","updated_at":"2016-03-30T13:14:58Z","closed_at":null,"body":"I'm new to predictionio and DASE, been going through these older templates to understand how it all works. \r\n\r\nThis template uses ALS.trainImplicit with view events which have been [aggregated](https://github.com/PredictionIO/template-scala-parallel-similarproduct/blob/develop/src/main/scala/ALSAlgorithm.scala#L88) in the **_train_** method of _**ALSAlgorithm.scala**_. \r\n\r\nThe [basic recommender](https://templates.prediction.io/PredictionIO/template-scala-parallel-recommendation) has a guide to [switch to implicit feedback](https://docs.prediction.io/templates/recommendation/training-with-implicit-preference/). In this guide, the code to aggregate views in put in the _**readTraining**_ method of **_DataSource.scala_**.\r\n\r\nIs there any difference between aggregating the view events in ALSAlgorithm.train versus DataSource.readTraining? \r\n\r\nShould the aggregating code on this template be moved to the readTraining method?"}}