dataset

package
v0.0.0-...-d606bfb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelToIndex

func LabelToIndex(length int) datasetOption

func Max

func Max(max int) datasetOption

func Resize

func Resize(x, y int) datasetOption

func SaveDS

func SaveDS(dataset *Dataset, file string) error

Types

type Dataset

type Dataset struct {
	Name string
	X    [][][][]float64
	Y    [][][][]float64
}

func FromCSV

func FromCSV(file string, labels []int, options ...datasetOption) (*Dataset, error)

Load a dataset from a CSV file

func FromFolder

func FromFolder(folder string, dec utils.Decoder, x, y int, options ...datasetOption) (*Dataset, error)

func LoadDS

func LoadDS(file string) (*Dataset, error)

func (*Dataset) Even

func (ds *Dataset) Even()

func (*Dataset) Normalize

func (ds *Dataset) Normalize()

func (*Dataset) Reshape

func (ds *Dataset) Reshape(x int, y int)

func (*Dataset) Shuffle

func (ds *Dataset) Shuffle()

func (*Dataset) Split

func (ds *Dataset) Split(train_size float64) ([][][][]float64, [][][][]float64, [][][][]float64, [][][][]float64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL