One Logo Pool Ball
CreateMLComponents · IOS API REFERENCE

ColumnConcatenator

struct · iOS 16.0+ · SDK 27.1

struct ColumnConcatenator<Scalar> where Scalar : MLShapedArrayScalar, Scalar : BinaryFloatingPoint

A transformer that concatenates every numerical column in a dataframe into to a shaped array for each row. The resulting concatenated column contains `MLShapedArray<Scalar>` elements. For example ┏━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓ ┃ ┃ label ┃ price ┃ rooms ┃ A ┃ B ┃ C ┃ ┃ ┃ <String> ┃ <Int> ┃ <Int> ┃ <Int> ┃ <Int> ┃ <Int> ┃ ┡━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━┩ │ 0 │ good │ 850,000 │ 4 │ 1 │ 0 │ 0 │ │ 1 │ bad │ 700,000 │ 3 │ 0 │ 1 │ 0 │ │ 2 │ bad │ 650,000 │ 3 │ 0 │ 0 │ 1 │ │ 3 │ good │ 600,000 │ 2 │ 0 │ 1 │ 0 │ └───┴──────────┴─────────┴───────┴───────┴───────┴───────┘ would be concatenated as: ┏━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ label ┃ features ┃ ┃ ┃ <String> ┃ <MLShapedArray<Float>> ┃ ┡━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩ │ 0 │ good │ [850,000, 4, 1, 0, 0] │ │ 1 │ bad │ [700,000, 3, 0, 1, 0] │ │ 2 │ bad │ [650,000, 3, 0, 0, 1] │ │ 3 │ good │ [600,000, 2, 0, 1, 0] │ └───┴──────────┴────────────────────────┘ Non-numerical columns are left in the data frame unchanged. Supported numeric types are `Int`, `UInt8`, `Float`, and `Double`. Arrays and shaped arrays of those types as supported, but every array in a given column must have the same shape and shaped arrays across columns must have the same shape except for the last dimension.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

No declarations were skipped in this snapshot.

All CreateMLComponents types →