com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Retrieving Summary of a Model via REST API

Overview

DescriptionRetrieve summary of a model.
Resource Path

/api/models/{modelId}/summary

HTTP MethodGET
Request/Response Formatapplication/json
Parameter description
Parameter
Description
{modelId}ID of the model of which you need to retrieve the summary.

Sample cURL command

curl -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -v https://localhost:9443/api/models/1/summary -k

Example

GET  https://localhost:9443/api/models/{modelId}/summary

Sample output

{
"features":["NumPregnancies","PG2","DBP","TSFT","SI2","BMI","DPF","Age"],
"modelSummaryType":"ProbabilisticClassificationModelSummary",
"multiclassConfusionMatrix":
{
"labels":["0","1"],
"matrix":[[151.0,3.0],[83.0,5.0]],"size":2},
"modelAccuracy":64.46,
"testResultDataPointsSample":
[
{"predictedVsActual":{"predicted":0.0,"actual":0.0},"featureValues":[4.0,110.0,92.0,0.0,0.0,37.6,0.191,30.0]},
{"predictedVsActual":{"predicted":0.0,"actual":1.0},"featureValues":[7.0,196.0,90.0,0.0,0.0,39.8,0.451,41.0]},
{"predictedVsActual":{"predicted":0.0,"actual":0.0},"featureValues":[1.0,93.0,70.0,31.0,0.0,30.4,0.315,23.0]},
...
...
],
"featureImportance":
[
{"label":"NumPregnancies","value":0.3079771926749934},
{"label":"PG2","value":0.25397098775785676},
{"label":"DBP","value":-1.2876785783739098},
{"label":"TSFT","value":-0.2739829065457813},
{"label":"SI2","value":-0.14733474834124655},
{"label":"BMI","value":-0.5283771021449392},
{"label":"DPF","value":0.004146841050477915},
{"label":"Age","value":-0.23892099781435874}
],
"auc":0.47476387249114554,
"roc":"[[\".00\",\".00\"],[\".00\",\".01\"],...]",
"algorithm":"LOGISTIC_REGRESSION"
}
}

REST API response

HTTP status code

200, 404 or 500

For descriptions of the HTTP status codes, see HTTP Status Codes.