Documentation
¶
Index ¶
- Constants
- type DictionaryModel
- type Dimension
- type Encoder
- type EncoderConfig
- type EncoderModel
- type EncoderType
- type FloatExactModel
- func (m *FloatExactModel) CalculateFloats(value []float64) []float64
- func (m *FloatExactModel) CalculateString(s string) []float64
- func (m *FloatExactModel) Fit(set *Input)
- func (m *FloatExactModel) GetDimensions() int
- func (m *FloatExactModel) GetQuality() float64
- func (m *FloatExactModel) Name() string
- type FloatReducerModel
- func (m *FloatReducerModel) CalculateFloats(value []float64) []float64
- func (m *FloatReducerModel) CalculateString(s string) []float64
- func (m *FloatReducerModel) Fit(set *Input)
- func (m *FloatReducerModel) GetDimensions() int
- func (m *FloatReducerModel) GetQuality() float64
- func (m *FloatReducerModel) Name() string
- type Input
- type InputType
- type Inputs
- type NGramModel
- type SplitDictionaryModel
- func (m *SplitDictionaryModel) CalculateFloats([]float64) []float64
- func (m *SplitDictionaryModel) CalculateString(s string) []float64
- func (m *SplitDictionaryModel) Fit(set *Input)
- func (m *SplitDictionaryModel) GetDimensions() int
- func (m *SplitDictionaryModel) GetQuality() float64
- func (m *SplitDictionaryModel) Name() string
- type Unified
Constants ¶
View Source
const (
DefaultGram = 3
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DictionaryModel ¶
func NewDictionaryModel ¶
func NewDictionaryModel() *DictionaryModel
func (*DictionaryModel) CalculateFloats ¶
func (m *DictionaryModel) CalculateFloats([]float64) []float64
func (*DictionaryModel) CalculateString ¶
func (m *DictionaryModel) CalculateString(s string) []float64
func (*DictionaryModel) Fit ¶
func (m *DictionaryModel) Fit(set *Input)
func (*DictionaryModel) GetDimensions ¶
func (m *DictionaryModel) GetDimensions() int
func (*DictionaryModel) GetQuality ¶
func (m *DictionaryModel) GetQuality() float64
func (*DictionaryModel) Name ¶
func (m *DictionaryModel) Name() string
type Dimension ¶
type Dimension struct { Inputs int InputType InputType Type EncoderType Model EncoderModel }
type Encoder ¶
type Encoder struct { // Name of the encoder Name string // Dimensions hold the EncoderModel for the dimensions Models map[string]*Dimension // Config of the Encoder Config *EncoderConfig // Scanned determines if scan was executed Scanned bool }
func NewEncoder ¶
type EncoderConfig ¶
type EncoderConfig struct { DelimiterToken string DimToSamplesRatio float64 // Decision heuristics FloatReducerThreshold int TopicModelMinDelimiters int NGramsMaxTokens int DictionaryMaxEntries int DictionaryMaxDelimiters int SplitDictionaryMaxEntries int // Application settings FloatReducerSpearman float64 FloatReducerSkewness float64 FloatReducerZeroValues bool NGramMaxGrams int NGramMaxCapacity int NGramCropRatio float64 DefaultStringEncoder EncoderType }
func DefaultConfig ¶
func DefaultConfig() *EncoderConfig
type EncoderModel ¶
type EncoderType ¶
type EncoderType int
const ( // Automatic means that the encoder decides based on heuristics what to do Automatic EncoderType = iota // StringDictionary uses exact matches on strings as dictionary approach StringDictionary // StringSplittedDictionary StringSplitDictionary // StringTopics uses topic modelling on strings StringTopics // StringNGrams uses N-Gram modelling on strings StringNGrams // FloatExact just uses the float value it gets from input FloatExact // FloatReducer reduces a large number of floats to a smaller input space FloatReducer )
func (EncoderType) String ¶
func (e EncoderType) String() string
type FloatExactModel ¶
func NewFloatExactModel ¶
func NewFloatExactModel() *FloatExactModel
func (*FloatExactModel) CalculateFloats ¶
func (m *FloatExactModel) CalculateFloats(value []float64) []float64
func (*FloatExactModel) CalculateString ¶
func (m *FloatExactModel) CalculateString(s string) []float64
func (*FloatExactModel) Fit ¶
func (m *FloatExactModel) Fit(set *Input)
func (*FloatExactModel) GetDimensions ¶
func (m *FloatExactModel) GetDimensions() int
func (*FloatExactModel) GetQuality ¶
func (m *FloatExactModel) GetQuality() float64
func (*FloatExactModel) Name ¶
func (m *FloatExactModel) Name() string
type FloatReducerModel ¶
type FloatReducerModel struct { Model map[int]bool Dimensions int Quality float64 Config *EncoderConfig }
func NewFloatReducerModel ¶
func NewFloatReducerModel(config *EncoderConfig) *FloatReducerModel
func (*FloatReducerModel) CalculateFloats ¶
func (m *FloatReducerModel) CalculateFloats(value []float64) []float64
func (*FloatReducerModel) CalculateString ¶
func (m *FloatReducerModel) CalculateString(s string) []float64
func (*FloatReducerModel) Fit ¶
func (m *FloatReducerModel) Fit(set *Input)
func (*FloatReducerModel) GetDimensions ¶
func (m *FloatReducerModel) GetDimensions() int
func (*FloatReducerModel) GetQuality ¶
func (m *FloatReducerModel) GetQuality() float64
func (*FloatReducerModel) Name ¶
func (m *FloatReducerModel) Name() string
type NGramModel ¶
type NGramModel struct { Dimensions int // Grams to index in vector GramsLookup map[string]int // Grams to number of appearances Grams map[string]int Samples int MaxGrams int MaxCapacity int CropRatio float64 Quality float64 }
func NewNGramModel ¶
func NewNGramModel(config *EncoderConfig) *NGramModel
func (*NGramModel) CalculateFloats ¶
func (m *NGramModel) CalculateFloats([]float64) []float64
func (*NGramModel) CalculateString ¶
func (m *NGramModel) CalculateString(s string) []float64
func (*NGramModel) Fit ¶
func (m *NGramModel) Fit(set *Input)
func (*NGramModel) GetDimensions ¶
func (m *NGramModel) GetDimensions() int
func (*NGramModel) GetQuality ¶
func (m *NGramModel) GetQuality() float64
func (*NGramModel) Name ¶
func (m *NGramModel) Name() string
type SplitDictionaryModel ¶
type SplitDictionaryModel struct { Dimensions int Delimiter string Dictionary []string Quality float64 }
func NewSplitDictionaryModel ¶
func NewSplitDictionaryModel(config *EncoderConfig) *SplitDictionaryModel
func (*SplitDictionaryModel) CalculateFloats ¶
func (m *SplitDictionaryModel) CalculateFloats([]float64) []float64
func (*SplitDictionaryModel) CalculateString ¶
func (m *SplitDictionaryModel) CalculateString(s string) []float64
func (*SplitDictionaryModel) Fit ¶
func (m *SplitDictionaryModel) Fit(set *Input)
func (*SplitDictionaryModel) GetDimensions ¶
func (m *SplitDictionaryModel) GetDimensions() int
func (*SplitDictionaryModel) GetQuality ¶
func (m *SplitDictionaryModel) GetQuality() float64
func (*SplitDictionaryModel) Name ¶
func (m *SplitDictionaryModel) Name() string
Click to show internal directories.
Click to hide internal directories.