Dataset

abstract class Dataset<T, Y>(source)

Just abstract Dataset.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
inner class BatchIterator<T : DType, V> : Iterator<DataBatch<T, V>>

An iterator over a Dataset.

Properties

Link copied to clipboard
abstract val xSize: Int

Returns amount of data rows.

Functions

Link copied to clipboard
fun <T : DType, V> batchIterator(batchSize: Int): Dataset.BatchIterator<T, V>

Returns BatchIterator with fixed batchSize.

Link copied to clipboard
abstract fun getX(idx: Int): T

Returns row by index idx.

Link copied to clipboard
abstract fun getY(idx: Int): Y

Returns label as Int by index idx.

Link copied to clipboard
abstract fun shuffle(): Dataset<T, Y>

Shuffles the dataset.

Link copied to clipboard
abstract fun split(splitRatio: Double): Pair<Dataset<T, Y>, Dataset<T, Y>>

Splits datasets on two sub-datasets according splitRatio.