| package org.template.classification | |
| import io.prediction.controller.IEngineFactory | |
| import io.prediction.controller.Engine | |
| class Query( | |
| val features: Array[Double] | |
| ) extends Serializable | |
| class PredictedResult( | |
| val label: Double | |
| ) extends Serializable | |
| object ClassificationEngine extends IEngineFactory { | |
| def apply() = { | |
| new Engine( | |
| classOf[DataSource], | |
| classOf[Preparator], | |
| Map("naive" -> classOf[NaiveBayesAlgorithm], | |
| "randomforest" -> classOf[RandomForestAlgorithm]), // ADDED | |
| classOf[Serving]) | |
| } | |
| } |