dataset

package
v0.0.0-...-471a3bb Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImageType is the value for image datasets.
	ImageType Type = "Image"
	// TableType is the value for table datasets.
	TableType = "Table"
	// UnknownType is the catch all dataset type.
	UnknownType = "Unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	ID     string          `json:"id"`
	Images []*ImageEncoded `json:"images"`
}

Image captures the data in an image dataset.

func NewImageDataset

func NewImageDataset(rawData []byte) (*Image, error)

NewImageDataset creates a new image dataset from raw byte data, assuming json.

func (*Image) CreateDataset

func (i *Image) CreateDataset(rootPath string) (*model.Dataset, error)

CreateDataset creates a basic dataset from an image dataset

func (*Image) GetPredictionsID

func (i *Image) GetPredictionsID() string

GetPredictionsID returns the prediction set id.

type ImageEncoded

type ImageEncoded struct {
	ID    string `json:"id"`
	Type  string `json:"type"`
	Image string `json:"image"`
	Label string `json:"label"`
}

ImageEncoded is a base46 encoded image.

type Row

type Row struct {
	ID   string            `json:"id"`
	Data map[string]string `json:"data"`
}

Row is a row of table data, tagged with an id.

type Table

type Table struct {
	ID   string `json:"id"`
	Rows []Row  `json:"rows"`
}

Table represents a basic table dataset.

func NewTableDataset

func NewTableDataset(rawData []byte) (*Table, error)

NewTableDataset creates a new table dataset from raw byte data, assuming json

func (*Table) CreateDataset

func (t *Table) CreateDataset(rootPath string) (*model.Dataset, error)

CreateDataset processes the table data structure into a dataset that can be used in the D3M ecosystem.

func (*Table) GetPredictionsID

func (t *Table) GetPredictionsID() string

GetPredictionsID returns the prediction set id.

type Type

type Type string

Type is an enum for supported dataset types.

Jump to

Keyboard shortcuts

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