Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Linear learner response formats

Focus mode
Linear learner response formats - Amazon SageMaker AI

JSON response formats

All Amazon SageMaker AI built-in algorithms adhere to the common input inference format described in Common Data Formats - Inference. The following are the available output formats for the SageMaker AI linear learner algorithm.

Binary Classification

let response = { "predictions": [ { "score": 0.4, "predicted_label": 0 } ] }

Multiclass Classification

let response = { "predictions": [ { "score": [0.1, 0.2, 0.4, 0.3], "predicted_label": 2 } ] }

Regression

let response = { "predictions": [ { "score": 0.4 } ] }

JSONLINES response formats

Binary Classification

{"score": 0.4, "predicted_label": 0}

Multiclass Classification

{"score": [0.1, 0.2, 0.4, 0.3], "predicted_label": 2}

Regression

{"score": 0.4}

RECORDIO response formats

Binary Classification

[ Record = { features = {}, label = { 'score': { keys: [], values: [0.4] # float32 }, 'predicted_label': { keys: [], values: [0.0] # float32 } } } ]

Multiclass Classification

[ Record = { "features": [], "label": { "score": { "values": [0.1, 0.2, 0.3, 0.4] }, "predicted_label": { "values": [3] } }, "uid": "abc123", "metadata": "{created_at: '2017-06-03'}" } ]

Regression

[ Record = { features = {}, label = { 'score': { keys: [], values: [0.4] # float32 } } } ]
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.