Initializer

init(_:)

Creates a new column of integers from a given range.

Declaration

init(_ range: Range<Int>)

Parameters

range

A range of integer elements for the new column.

Discussion

Use this initializer to create a column of incrementing values from a range.

// init(_ range: Range<Int>
let rangeColumn = MLUntypedColumn(3..<7)

print(rangeColumn)
/* Prints...
 ValueType: Int
 Values:        [3, 4, 5, 6]
 */

See Also

Creating an Untyped Column

init<T>(repeating: T, count: Int)

Creates a new column with a repeating value.

init(repeating: MLDataValue, count: Int)

Creates a new column with a repeating value.

init(ClosedRange<Int>)

Creates a new column of integers from a given closed range.

init<S>(S)

Creates a new column from a given sequence of elements that can be converted to machine learning data values.

init<S>(S)

Creates a new column from a given sequence of machine learning data values.

init()

Creates an empty, invalid column used to remove an existing column from a data table.