datasets

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package datasets implements the Neurlang dataset type

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datamap added in v0.0.2

type Datamap map[uint16]uint64

Datamap holds keys mapped to values

func (*Datamap) Init added in v0.0.2

func (d *Datamap) Init()

Init initializes the Datamap

func (Datamap) Reduce added in v0.0.2

func (d Datamap) Reduce(whole bool) (o Datamap)

Reduce reduces the datamap

func (Datamap) Split added in v0.0.2

func (d Datamap) Split() (o SplittedDataset)

Split splits datamap into a true set and a false set

type Dataset

type Dataset map[uint32]bool

Dataset holds keys mapped to booleans

func (*Dataset) Init

func (d *Dataset) Init()

Init initializes the Dataset

func (Dataset) Split added in v0.0.2

func (d Dataset) Split() (o SplittedDataset)

Split splits dataset into a true set and a false set

type SplittedDataset

type SplittedDataset [2]map[uint32]struct{}

SplittedDataset is a dataset that has been split into the false set and true set

func BalanceDataset

func BalanceDataset(d SplittedDataset) SplittedDataset

BalanceDataset fills the smaller set with random number until it matches the bigger set

func (*SplittedDataset) Init added in v0.0.2

func (d *SplittedDataset) Init()

Init initializes a SplittedDataset

func (SplittedDataset) Split added in v0.0.2

func (d SplittedDataset) Split() (o SplittedDataset)

Split splits SplittedDataset into a true set and a false set

type Splitter added in v0.0.2

type Splitter interface {
	Split() (o SplittedDataset)
}

Splitter is a dataset that can be split into a SplittedDataset

type Tally added in v0.0.3

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

Tally is used to count votes on dataset features and return the majority votes

func (*Tally) AddToCorrect added in v0.0.3

func (t *Tally) AddToCorrect(feature uint32, vote int8, improvement bool)

Correct votes for feature which caused the overall result to be correct

func (*Tally) AddToImprove added in v0.0.3

func (t *Tally) AddToImprove(feature uint32, vote int8)

Improve votes for feature which improved the overall result

func (*Tally) AddToMapAll added in v0.0.4

func (t *Tally) AddToMapAll(feature uint16, output uint64, loss func(n uint32) uint32, max uint32)

AddToMapAll adds feature maps to all output votes to mapping

func (*Tally) AddToMapping added in v0.0.3

func (t *Tally) AddToMapping(feature uint16, output uint64)

AddToMap adds feature maps to this output votes to mapping

func (*Tally) Free added in v0.0.3

func (t *Tally) Free()

Free frees the memory occupied by tally dataset structure

func (*Tally) GetImprovementPossible added in v0.0.4

func (t *Tally) GetImprovementPossible() bool

GetImprovementPossible reads improvementPossible

func (*Tally) Init added in v0.0.3

func (t *Tally) Init()

Init initializes the tally dataset structure

func (*Tally) Len added in v0.0.3

func (t *Tally) Len() (o int)

Len estimates the size of tally

func (*Tally) SetFinalization added in v0.0.4

func (t *Tally) SetFinalization(final bool)

SetFinalization sets isFinalization and enables the final stage of training

func (*Tally) Split added in v0.0.3

func (t *Tally) Split() SplittedDataset

Split Splits the tally structure into a splitted dataset

Directories

Path Synopsis
Package isalnum implements the IsAlnum Dataset
Package isalnum implements the IsAlnum Dataset
Package isvirus contains TLSH hashes of viruses and clean files dataset for machine learning (without leading "T1" characters)
Package isvirus contains TLSH hashes of viruses and clean files dataset for machine learning (without leading "T1" characters)
Package MNIST is the 60000 + 10000 handwritten digits dataset
Package MNIST is the 60000 + 10000 handwritten digits dataset

Jump to

Keyboard shortcuts

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