TypedSeries
public struct TypedSeries<Element> : DataSeries
-
Declaration
Swift
public typealias Element = Element
-
Declaration
Swift
public func makeIterator() -> DataSeriesIterator<TypedSeries>
-
Declaration
Swift
public func prefetch(_ i: Int, streamContext: StreamContext?)
-
Declaration
Swift
public func next(_ streamContext: StreamContext?) -> Element?
-
Declaration
Swift
public var underestmiatedCount: Int { get }
-
Declaration
Swift
public let count: Int
-
Sample existing column to create a new dataframe.
Declaration
Parameters
size
How many rows to be sampled together.
repeating
Will we repeat the sampling to create more columns?
sampler
The sampling function, for example, averaging, max, first, last etc.
Return Value
A new dataframe.
-
Create a new column by applying some transformations on an existing column.
Declaration
Swift
public func map<U>(_ mapper: @escaping (Element) -> U) -> DataFrame.UntypedSeries
-
Combine tensors into one tensor. This is useful for GPU batching.
Declaration
Swift
public func combine(size: Int, repeating: Int? = nil) -> DataFrame
Parameters
size
How many tensors to group together.
repeating
How many new columns to be created.
Return Value
A new dataframe with combined tensors.
-
Load images into tensors. It is expected to be called from a column with file paths.
Declaration
Swift
public func toLoadImage() -> DataFrame.UntypedSeries
-
Create one-hot tensors. It is expected to be called from a column with Int.
Declaration
Swift
public func toOneHot<T: TensorNumeric>( _ dataType: T.Type, count: Int, onval: Float = 1, offval: Float = 0 ) -> DataFrame.UntypedSeries
-
Copy tensor to GPU. It is expected to be called from a column of tensors.
Declaration
Swift
public func toGPU(_ ordinal: Int = 0) -> DataFrame.UntypedSeries
-
Declaration
Swift
public func toOneSquared(maxLength: Int, variableLength: Bool = true) -> DataFrame.UntypedSeries
-
Declaration
Swift
public func toTruncate(_ other: DataFrame.UntypedSeries) -> DataFrame.UntypedSeries
-
Declaration
Swift
public func toTruncate<OtherElement: AnyTensor>(_ other: DataFrame.TypedSeries<OtherElement>) -> DataFrame.UntypedSeries
-
toImageJitter(_:
size: resize: contrast: saturation: brightness: lighting: aspectRatio: symmetric: seed: centerCrop: offset: normalize: ) Apply some jitter to loaded images.
Declaration
Swift
public func toImageJitter<T: TensorNumeric>( _ ofType: T.Type, size: ImageJitter.Size, resize: ImageJitter.Resize, contrast: Float = 0, saturation: Float = 0, brightness: Float = 0, lighting: Float = 0, aspectRatio: Float = 0, symmetric: Bool = false, seed: Int = 0, centerCrop: Bool = false, offset: ImageJitter.Offset = ImageJitter.Offset(x: 0, y: 0), normalize: ImageJitter.Normalize = ImageJitter.Normalize(mean: []) ) -> DataFrame.UntypedSeries