data

package
v0.0.0-...-a6366f5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OneHot

func OneHot(m mat.Matrix) mat.Matrix

OneHot returns the one-hot encoding of the given matrix

Types

type DataSet

type DataSet struct {
	// contains filtered or unexported fields
}

DataSet is a dataset

func Copy

func Copy(d DataSet) DataSet

Copy returns a copy of the given data set

func Init

func Init(data, labels mat.Matrix) DataSet

Init initializes a data set with the given data and labels

func (DataSet) AttributeCount

func (d DataSet) AttributeCount() int

AttributeCount returns the number of attributes in a data set

func (DataSet) Data

func (d DataSet) Data() mat.Matrix

Data returns the DataSet's data

func (DataSet) GenerateBatches

func (d DataSet) GenerateBatches(batchSize int) []DataSet

GenerateBatches generates a set of batches with the given batch size

func (DataSet) Labels

func (d DataSet) Labels() mat.Matrix

Labels returns the DataSet's labels

func (DataSet) Sample

func (d DataSet) Sample(i int) Sample

Sample returns the ith sample

func (DataSet) SampleCount

func (d DataSet) SampleCount() int

SampleCount returns the sample count of a DataSet

func (DataSet) Shuffle

func (d DataSet) Shuffle(r rander.Rander)

Shuffle shuffles the samples into a random order

type Sample

type Sample struct {
	// contains filtered or unexported fields
}

Sample an individual sample

func (Sample) DataValue

func (s Sample) DataValue(i int) float64

DataValue returns the data value at the ith index

func (Sample) Label

func (s Sample) Label(i int) float64

Label returns the label at the ith index

Jump to

Keyboard shortcuts

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