Documentation
¶
Overview ¶
Package datasets implements the Neurlang dataset type
Index ¶
- type AnyTally
- type Datamap
- type Dataset
- type PreTally
- func (t *PreTally) AddToCorrect(feature uint32, vote int8, improvement bool)
- func (t *PreTally) AddToImprove(feature uint32, vote int8)
- func (t *PreTally) AddToMapping(feature uint16, output uint64)
- func (d *PreTally) DatasetAt(position int) Dataset
- func (d *PreTally) Free()
- func (d *PreTally) GetCellDecision(position int, feature uint32) (bool, bool)
- func (t *PreTally) GetGlobalPremodulo() uint32
- func (t *PreTally) GetGlobalSaltPremodulo() [2]uint32
- func (t *PreTally) GetImprovementPossible() bool
- func (d *PreTally) Init()
- func (t *PreTally) IsGlobalPremodulo() bool
- func (d *PreTally) Len() (ret int)
- func (d *PreTally) SetCellDecision(position int, feature uint32, output bool)
- func (t *PreTally) SetGlobalPremodulo(mod uint32)
- type SplittedDataset
- type Splitter
- type Tally
- func (t *Tally) AddToCorrect(feature uint32, vote int8, improvement bool)
- func (t *Tally) AddToImprove(feature uint32, vote int8)
- func (t *Tally) AddToMapAll(feature uint16, output uint64, loss func(n uint32) uint32, max uint32)
- func (t *Tally) AddToMapping(feature uint16, output uint64)
- func (t *Tally) Dataset() Dataset
- func (t *Tally) DatasetAt(n int) Dataset
- func (t *Tally) Free()
- func (t *Tally) GetCellDecision(position int, feature uint32) (val bool, avail bool)
- func (t *Tally) GetGlobalPremodulo() uint32
- func (t *Tally) GetGlobalSaltPremodulo() [2]uint32
- func (t *Tally) GetImprovementPossible() bool
- func (t *Tally) Init()
- func (t *Tally) IsGlobalPremodulo() bool
- func (t *Tally) Len() (o int)
- func (t *Tally) SetCellDecision(position int, feature uint32, output bool)
- func (t *Tally) SetFinalization(final bool)
- func (t *Tally) SetGlobalPremodulo(mod uint32)
- func (t *Tally) Split() SplittedDataset
- type TallyType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyTally ¶
type AnyTally interface {
// Erase
Init()
// Global Premodulo
IsGlobalPremodulo() bool
SetGlobalPremodulo(mod uint32)
GetGlobalSaltPremodulo() [2]uint32
GetGlobalPremodulo() uint32
// Pre tallying
GetCellDecision(position int, feature uint32) (bool, bool)
SetCellDecision(position int, feature uint32, output bool)
// Tallying
AddToCorrect(feature uint32, vote int8, improvement bool)
AddToImprove(feature uint32, vote int8)
AddToMapping(feature uint16, output uint64)
// Get Dataset at
DatasetAt(n int) Dataset
GetImprovementPossible() bool
// Len
Len() (ret int)
}
func NewAnyTally ¶
type Datamap ¶
Datamap holds keys mapped to values
func (Datamap) Split ¶
func (d Datamap) Split() (o SplittedDataset)
Split splits datamap into a true set and a false set
type Dataset ¶
Dataset holds keys mapped to booleans
func (Dataset) Split ¶
func (d Dataset) Split() (o SplittedDataset)
Split splits dataset into a true set and a false set
type PreTally ¶
type PreTally struct {
// contains filtered or unexported fields
}
PreTally stores distilled decisions for multiple cells with thread-safe access
func (*PreTally) AddToCorrect ¶
AddToCorrect votes for feature which caused the overall result to be correct
func (*PreTally) AddToImprove ¶
AddToImprove votes for feature which caused the overall result to be correct
func (*PreTally) AddToMapping ¶
AddToMapping adds feature maps to this output votes to mapping
func (*PreTally) GetCellDecision ¶
GetCellDecision returns the distilled output for a specific cell and feature
func (*PreTally) GetGlobalPremodulo ¶
func (*PreTally) GetGlobalSaltPremodulo ¶
func (*PreTally) GetImprovementPossible ¶
GetImprovementPossible reads improvementPossible
func (*PreTally) IsGlobalPremodulo ¶
func (*PreTally) SetCellDecision ¶
SetCellDecision stores a distilled decision for a specific cell and feature
func (*PreTally) SetGlobalPremodulo ¶
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) Split ¶
func (d SplittedDataset) Split() (o SplittedDataset)
Split splits SplittedDataset into a true set and a false set
type Splitter ¶
type Splitter interface {
Split() (o SplittedDataset)
}
Splitter is a dataset that can be split into a SplittedDataset
type Tally ¶
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 ¶
Correct votes for feature which caused the overall result to be correct
func (*Tally) AddToImprove ¶
Improve votes for feature which improved the overall result
func (*Tally) AddToMapAll ¶
AddToMapAll adds feature maps to all output votes to mapping
func (*Tally) AddToMapping ¶
AddToMap adds feature maps to this output votes to mapping
func (*Tally) Free ¶
func (t *Tally) Free()
Free frees the memory occupied by tally dataset structure
func (*Tally) GetCellDecision ¶
GetCellDecision returns the distilled output for a specific cell and feature
func (*Tally) GetGlobalPremodulo ¶
func (*Tally) GetGlobalSaltPremodulo ¶
func (*Tally) GetImprovementPossible ¶
GetImprovementPossible reads improvementPossible
func (*Tally) IsGlobalPremodulo ¶
func (*Tally) SetCellDecision ¶
SetCellDecision stores a distilled decision for a specific cell and feature
func (*Tally) SetFinalization ¶
SetFinalization sets isFinalization and enables the final stage of training
func (*Tally) SetGlobalPremodulo ¶
func (*Tally) Split ¶
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 |