init(_:)
Creates a new column from a given sequence of elements that can be converted to machine learning data values.
Declaration
init<S>(_ source: S) where S : Sequence, S.Element : MLDataValueConvertibleParameters
- source:
A sequence of convertible elements for the new column.
Discussion
Use this initializer to create a column from a sequence of any type that conforms to MLDataValueConvertible.
let sequenceColumn = MLUntypedColumn([2, 3, 5, 7, 11])
print(sequenceColumn)
/* Prints...
ValueType: Int
Values: [2, 3, 5, 7, 11]
*/