blob: 22add399e22f1d7a0f7864aabb49b61818237fc5 [file] [log] [blame]
package org.template.recommendation
import io.prediction.controller.IEngineFactory
import io.prediction.controller.Engine
case class Query(
user: String,
num: Int
) extends Serializable
case class PredictedResult(
itemScores: Array[ItemScore]
) extends Serializable
case class ItemScore(
item: String,
score: Double
) extends Serializable
object RecommendationEngine extends IEngineFactory {
def apply() = {
new Engine(
classOf[DataSource],
classOf[Preparator],
Map("als" -> classOf[ALSAlgorithm]),
classOf[Serving])
}
}