Skip to content
Snippets Groups Projects

Json

Merged Athanasios Xygkis requested to merge json into master
Files
4
@@ -65,9 +65,35 @@ object Predictor extends App {
// Limiting the scope of implicit formats with {}
implicit val formats = org.json4s.DefaultFormats
val answers: Map[String, Any] = Map(
"3.1.4" -> Map(
"global-mae" -> globalMae
)
"Q3.1.4" -> Map(
"MaeGlobalMethod" -> globalMae, // Datatype of answer: Double
"MaePerUserMethod" -> 0.78, // Datatype of answer: Double
"MaePerItemMethod" -> 0.98, // Datatype of answer: Double
"MaeBaselineMethod" -> 0.85 // Datatype of answer: Double
),
"Q3.1.5" -> Map(
"DurationInMicrosecForGlobalMethod" -> Map(
"min" -> 10.1, // Datatype of answer: Double
"max" -> 20.2, // Datatype of answer: Double
"average" -> 15.3 // Datatype of answer: Double
),
"DurationInMicrosecForPerUserMethod" -> Map(
"min" -> 40.1, // Datatype of answer: Double
"max" -> 50.2, // Datatype of answer: Double
"average" -> 45.3 // Datatype of answer: Double
),
"DurationInMicrosecForPerItemMethod" -> Map(
"min" -> 30.1, // Datatype of answer: Double
"max" -> 40.2, // Datatype of answer: Double
"average" -> 35.3 // Datatype of answer: Double
),
"DurationInMicrosecForBaselineMethod" -> Map(
"min" -> 80.1, // Datatype of answer: Double
"max" -> 100.2, // Datatype of answer: Double
"average" -> 95.3 // Datatype of answer: Double
),
),
)
json = Serialization.writePretty(answers)
}
Loading