Class

com.amazonaws.services.sagemaker.sparksdk.transformation.serializers

LibSVMRequestRowSerializer

Related Doc: package serializers

Permalink

class LibSVMRequestRowSerializer extends RequestRowSerializer with Serializable

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.

Linear Supertypes
RequestRowSerializer, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LibSVMRequestRowSerializer
  2. RequestRowSerializer
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LibSVMRequestRowSerializer(schema: Option[StructType] = None, labelColumnName: String = "label", featuresColumnName: String = "features")

    Permalink

    schema

    The schema of Rows being serialized. This parameter is Optional as the schema may not be known when this serializer is constructed.

    labelColumnName

    The name of the label column

    featuresColumnName

    the name of the features column

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val contentType: String

    Permalink

    Returns com.amazonaws.services.sagemaker.sparksdk.transformation.ContentTypes.TEXT_LIBSVM

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. val featuresColumnName: String

    Permalink

    the name of the features column

  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. val labelColumnName: String

    Permalink

    The name of the label column

  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. var rowSchema: StructType

    Permalink

    The schema for Row objects being serialized by RequestRowSerializer#serializeRow

    The schema for Row objects being serialized by RequestRowSerializer#serializeRow

    Attributes
    protected
    Definition Classes
    RequestRowSerializer
  19. val schema: Option[StructType]

    Permalink

    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.

  20. def serializeRow(row: Row): Array[Byte]

    Permalink

    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

    row

    The row to serialize

    returns

    An Array[Byte]

    Definition Classes
    LibSVMRequestRowSerializerRequestRowSerializer
  21. def setSchema(schema: StructType): Unit

    Permalink

    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.

    Definition Classes
    LibSVMRequestRowSerializerRequestRowSerializer
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. def validateSchema(schema: StructType): Unit

    Permalink

    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.

    Definition Classes
    LibSVMRequestRowSerializerRequestRowSerializer
    Exceptions thrown

    java.lang.IllegalArgumentException if the specified schema is invalid

  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from RequestRowSerializer

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped