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