Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: CC-BY-SA-4.0

Data Formats for K-nn Training Input

All Amazon SageMaker built-in algorithms adhere to the common input training formats described in Common Data Formats - Training. This topic contains a list of the available input formats for the Amazon SageMaker k-nearest-neighbor algorithm.

content-type: text/csv; label_size=1

4,1.2,1.3,9.6,20.3

The first label_size columns are interpreted as the label vector for that row.

content-type: application/x-recordio-protobuf

[
    Record = {
        features = {
            'values': {
                values: [1.2, 1.3, 9.6, 20.3]  # float32
            }
        },
        label = {
            'values': {
                values: [4]  # float32
            }
        }
    }
] 

                
}