Documentation ¶
Overview ¶
Each sample contains some sentences and at least one assigned class.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrainInterface ¶
type ClassInterface ¶
type ClassSizeMap ¶
This map contains classes size in the training dataset. The key of map is a Class ID and values is a total tokens count in the each class.
type HumanizedPrediction ¶
type HumanizedPrediction struct { Probabilities map[string]float64 `json:"probabilities"` Duration float64 `json:"duration"` }
HumanizedPrediction describes structure which contains class labels and their probabilities
func NewHumanizedPrediction ¶
func NewHumanizedPrediction(probabilities map[string]float64, duration time.Duration) HumanizedPrediction
NewHumanizedPrediction is a constructor
func (HumanizedPrediction) JSON ¶
func (hp HumanizedPrediction) JSON() (string, error)
JSON helps to convert structure to string
type Prediction ¶
type Prediction struct {
// contains filtered or unexported fields
}
Prediction represents results of predictor
func NewPrediction ¶
func NewPrediction(probabilities map[int64]float64) Prediction
NewPrediction is a constructor
func (*Prediction) GetClassIDs ¶
func (p *Prediction) GetClassIDs() []int64
GetClassIDs Returns identifiers list of predicted classes
func (*Prediction) GetClassProbability ¶
func (p *Prediction) GetClassProbability(classID int64) float64
GetClassProbability returns identifiers list of predicted classes
type TokenInterface ¶
type TrainedModel ¶
type TrainedModel struct { SamplesCount int64 UniqueTokensCount int64 ClassFrequency result.ClassFrequency ClassSize ClassSizeMap TokenFrequency result.TokenFrequency }
func (TrainedModel) GetClassFrequency ¶
func (m TrainedModel) GetClassFrequency() result.ClassFrequency
func (TrainedModel) GetClassSizes ¶
func (m TrainedModel) GetClassSizes() ClassSizeMap
func (TrainedModel) GetSamplesCount ¶
func (m TrainedModel) GetSamplesCount() int64
func (TrainedModel) GetTokenFrequency ¶
func (m TrainedModel) GetTokenFrequency() result.TokenFrequency
func (TrainedModel) GetUniqueTokensCount ¶
func (m TrainedModel) GetUniqueTokensCount() int64
Click to show internal directories.
Click to hide internal directories.