blob: 71e09bf607297e0025de32b776134fbe9bee970a [file] [log] [blame]
package org.example.recommendation
import org.apache.predictionio.controller.EngineFactory
import org.apache.predictionio.controller.Engine
case class Query(
user: String,
num: Int
)
case class PredictedResult(
itemScores: Array[ItemScore]
)
case class ActualResult(
ratings: Array[Rating]
)
case class ItemScore(
item: String,
score: Double
)
object RecommendationEngine extends EngineFactory {
def apply() = {
new Engine(
classOf[DataSource],
classOf[Preparator],
Map("als" -> classOf[ALSAlgorithm]),
classOf[Serving])
}
}