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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
type Datamap ¶ added in v0.0.2
Datamap holds keys mapped to values
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 ¶
Dataset holds keys mapped to booleans
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 PreTally ¶ added in v0.2.0
type PreTally struct {
// contains filtered or unexported fields
}
PreTally stores distilled decisions for multiple cells with thread-safe access
func (*PreTally) AddToCorrect ¶ added in v0.2.0
AddToCorrect votes for feature which caused the overall result to be correct
func (*PreTally) AddToImprove ¶ added in v0.2.0
AddToImprove votes for feature which caused the overall result to be correct
func (*PreTally) AddToMapping ¶ added in v0.2.0
AddToMapping adds feature maps to this output votes to mapping
func (*PreTally) GetCellDecision ¶ added in v0.2.0
GetCellDecision returns the distilled output for a specific cell and feature
func (*PreTally) GetGlobalPremodulo ¶ added in v0.2.0
func (*PreTally) GetGlobalSaltPremodulo ¶ added in v0.2.0
func (*PreTally) GetImprovementPossible ¶ added in v0.2.0
GetImprovementPossible reads improvementPossible
func (*PreTally) IsGlobalPremodulo ¶ added in v0.2.0
func (*PreTally) SetCellDecision ¶ added in v0.2.0
SetCellDecision stores a distilled decision for a specific cell and feature
func (*PreTally) SetGlobalPremodulo ¶ added in v0.2.0
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
Correct votes for feature which caused the overall result to be correct
func (*Tally) AddToImprove ¶ added in v0.0.3
Improve votes for feature which improved the overall result
func (*Tally) AddToMapAll ¶ added in v0.0.4
AddToMapAll adds feature maps to all output votes to mapping
func (*Tally) AddToMapping ¶ added in v0.0.3
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) GetCellDecision ¶ added in v0.2.0
GetCellDecision returns the distilled output for a specific cell and feature
func (*Tally) GetGlobalPremodulo ¶ added in v0.1.5
func (*Tally) GetGlobalSaltPremodulo ¶ added in v0.1.5
func (*Tally) GetImprovementPossible ¶ added in v0.0.4
GetImprovementPossible reads improvementPossible
func (*Tally) Init ¶ added in v0.0.3
func (t *Tally) Init()
Init initializes the tally dataset structure
func (*Tally) IsGlobalPremodulo ¶ added in v0.1.5
func (*Tally) SetCellDecision ¶ added in v0.2.0
SetCellDecision stores a distilled decision for a specific cell and feature
func (*Tally) SetFinalization ¶ added in v0.0.4
SetFinalization sets isFinalization and enables the final stage of training
func (*Tally) SetGlobalPremodulo ¶ added in v0.1.5
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 |