Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForEachBatch ¶
ForEachBatch divides the dataset into batches, returning the start-end of each batch with a callback. This function assumes that the dataset has already been shuffled.
func GenerateBatches ¶
GenerateBatches generates a list of batches so that the classes distribution among them is approximately the same. The class is given by the callback for each i-th element up to size. The size of each batch depends on number of classes (batchFactor * nClasses). Each batch consists in a list of indices.
func SplitDataset ¶
func SplitDataset(size int, splitRatio mat.Float, seed uint64, class func(i int) string) (a []int, b []int)
SplitDataset splits the dataset into two parts. Each part consists in a list of indices. The split ratio regulates the percentage of the total assigned to `b` so that `a` contains the rest. For example a split ratio of 0.20 means that `b` should contain the 20% of the total and `a` the rest 80%.
Types ¶
This section is empty.