com.amazonaws.services.sagemaker.sparksdk.transformation.serializers
The schema of Rows being serialized. This parameter is Optional as the schema may not be known when this serializer is constructed.
The name of the label column
the name of the features column
Returns com.amazonaws.services.sagemaker.sparksdk.transformation.ContentTypes.TEXT_LIBSVM
the name of the features column
The name of the label column
The schema for Row objects being serialized by RequestRowSerializer#serializeRow
The schema for Row objects being serialized by RequestRowSerializer#serializeRow
The schema of Rows being serialized.
The schema of Rows being serialized. This parameter is Optional as the schema may not be known when this serializer is constructed.
Serializes an object to an Array of bytes for transformation by a SageMaker endpoint
Serializes an object to an Array of bytes for transformation by a SageMaker endpoint
The row to serialize
An Array[Byte]
Sets the rowSchema for this RequestRowSerializer.
Sets the rowSchema for this RequestRowSerializer. Invokes validateSchema on the specified schema.
This method must be invoked before calling serializeRow if no schema was set when this RequestRowSerializer was constructed.
Validates that the specified schema contains a Double column with name labelColumnName and a Vector column with name featuresColumnName.
Validates that the specified schema contains a Double column with name labelColumnName and a Vector column with name featuresColumnName.
java.lang.IllegalArgumentException
if the specified schema is invalid
Extracts a label column and features column from a Row and serializes as a LibSVM record. Each Row must contain a Double column and a Vector column containing the label and features respectively. Row field indexes for the label and features are obtained by looking up the index of labelColumnName and featuresColumnName respectively in the specified schema.
A schema must be specified before RequestRowSerializer#serializeRow is invoked by a client of this RequestRowSerializer. The schema is set either on instantiation of this RequestRowSerializer or by RequestRowSerializer#setSchema.