

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Format respons pelajar linier
<a name="LL-in-formats"></a>

## Format respons JSON
<a name="LL-json"></a>

Semua algoritme bawaan Amazon SageMaker AI mematuhi format inferensi input umum yang dijelaskan dalam [Format Data Umum -](https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html) Inferensi. Berikut ini adalah format output yang tersedia untuk algoritma SageMaker AI linear learner.

**Klasifikasi Biner**

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

**Klasifikasi Multiclass**

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

**Regresi**

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

## Format respons JSONLINES
<a name="LL-jsonlines"></a>

**Klasifikasi Biner**

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

**Klasifikasi Multiclass**

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

**Regresi**

```
{"score": 0.4}
```

## Format respons RECORDIO
<a name="LL-recordio"></a>

**Klasifikasi Biner**

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

**Klasifikasi Multiclass**

```
[
    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'}"
   }
]
```

**Regresi**

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