Documentation ¶
Overview ¶
This package contains data types for the training results representation. Each training for Bayes algorithm provides these data:
- Classes frequencies
- Features per classes frequencies
- Total number of samples processed during the training
This package contains data types for the training results representation. Each training for Bayes algorithm provides these data:
- Classes frequencies
- Features per classes frequencies
- Total number of samples processed during the training
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClassFrequency ¶
This map contains classes frequencies in the training dataset. The key of map is a Class ID and values is a count of samples with this class.
type TextClassFrequency ¶
This map contains classes frequencies in the training dataset. The key of map is a Class ID and values is a count of samples with this class.
type TextTokenFrequency ¶
This map contains tokens (or features) frequencies for classes in the training dataset. The first-level key is a Class ID, the second-level key is Token ID, and the value is a number of sample which have the corresponding class and token.
type TextTrainingResult ¶
type TextTrainingResult struct { SamplesCount int64 // The total number of samples seen in dataset TextClassFrequency TextClassFrequency TextTokenFrequency TextTokenFrequency }
func NewTextTrainingResult ¶
func NewTextTrainingResult() *TextTrainingResult
func (*TextTrainingResult) IncClassCount ¶
func (t *TextTrainingResult) IncClassCount(class string)
func (*TextTrainingResult) IncSamplesCount ¶
func (t *TextTrainingResult) IncSamplesCount()
func (*TextTrainingResult) IncTokenCount ¶
func (t *TextTrainingResult) IncTokenCount(class, token string)
type TokenFrequency ¶
This map contains tokens (or features) frequencies for classes in the training dataset. The first-level key is a Class ID, the second-level key is Token ID, and the value is a number of sample which have the corresponding class and token.
type TrainingResult ¶
type TrainingResult struct { SamplesCount int64 // The total number of samples seen in dataset ClassFrequency ClassFrequency TokenFrequency TokenFrequency }
func NewTrainingResult ¶
func NewTrainingResult() *TrainingResult
func (*TrainingResult) IncClassCount ¶
func (t *TrainingResult) IncClassCount(classID int64)
func (*TrainingResult) IncSamplesCount ¶
func (t *TrainingResult) IncSamplesCount()
func (*TrainingResult) IncTokenCount ¶
func (t *TrainingResult) IncTokenCount(classID, tokenID int64)