score = (player, aggregate, resolution, type="floatCdf", marketType="marketScore") => {
if (type == "floatCdf") {
return new predictionAnalysis.PredictionResolutionGroup(
{agentPrediction: {
data: { xs: player["xs"], ys: player["ys"] },
dataType: type},
marketPrediction: (marketType == "marketScore")? {
data: { xs: aggregate["xs"], ys: aggregate["ys"] },
dataType: type} : undefined,
resolution: {
data: { xs: resolution["xs"], ys: resolution["ys"] },
dataType: type}
}).pointScore(predictionAnalysis[marketType])["data"]}
else {
return new predictionAnalysis.PredictionResolutionGroup(
{agentPrediction: {
data: player,
dataType: type},
marketPrediction: (marketType == "marketScore")? {
data: aggregate,
dataType: type} : undefined,
resolution: {
data: resolution,
dataType: type}
}).pointScore(predictionAnalysis[marketType])["data"]}
}