Documentation ¶
Index ¶
- Variables
- func DefaultStopCondition(iteration, iterations, generations int, model Model) bool
- type AveragedStrategy
- type Decoded
- type DecodedInstance
- type EarlyUpdateInstanceDecoder
- type EmptyFeatureExtractor
- type FeatureExtractor
- type Instance
- type InstanceDecoder
- type LinearPerceptron
- type Model
- type StopCondition
- type SupervisedTrainer
- type TrivialStrategy
- type UnsupervisedTrainer
- type UpdateStrategy
Constants ¶
This section is empty.
Variables ¶
View Source
var PercepAllOut bool = false
Functions ¶
func DefaultStopCondition ¶
Types ¶
type AveragedStrategy ¶
type AveragedStrategy struct {
P, N int64
// contains filtered or unexported fields
}
func (*AveragedStrategy) Finalize ¶
func (u *AveragedStrategy) Finalize(m Model) Model
func (*AveragedStrategy) Init ¶
func (u *AveragedStrategy) Init(m Model, iterations int)
func (*AveragedStrategy) Update ¶
func (u *AveragedStrategy) Update(m Model)
type DecodedInstance ¶
type EarlyUpdateInstanceDecoder ¶
type EarlyUpdateInstanceDecoder interface {
DecodeEarlyUpdate(i DecodedInstance, m Model) (decoded DecodedInstance, decodedFeatures, goldFeatures interface{}, earlyUpdatedAt, goldSize int, decodeScore float64)
}
type EmptyFeatureExtractor ¶
type EmptyFeatureExtractor struct { }
func (*EmptyFeatureExtractor) EstimatedNumberOfFeatures ¶
func (e *EmptyFeatureExtractor) EstimatedNumberOfFeatures() int
func (*EmptyFeatureExtractor) Features ¶
func (e *EmptyFeatureExtractor) Features(i Instance, flag bool, ttype byte, arr []int) []Feature
func (*EmptyFeatureExtractor) SetLog ¶
func (e *EmptyFeatureExtractor) SetLog(flag bool)
type FeatureExtractor ¶
type InstanceDecoder ¶
type InstanceDecoder interface { Decode(i Instance, m Model) (DecodedInstance, interface{}) DecodeGold(i DecodedInstance, m Model) (DecodedInstance, interface{}) }
type LinearPerceptron ¶
type LinearPerceptron struct { Decoder EarlyUpdateInstanceDecoder GoldDecoder InstanceDecoder Updater UpdateStrategy Iterations int Model Model Log bool Tempfile string TrainI, TrainJ int TempLines int FailedInstances int Continue StopCondition }
func (*LinearPerceptron) Init ¶
func (m *LinearPerceptron) Init(newModel Model)
func (*LinearPerceptron) Train ¶
func (m *LinearPerceptron) Train(goldInstances []DecodedInstance)
type StopCondition ¶
type SupervisedTrainer ¶
type SupervisedTrainer interface {
Train(instances []DecodedInstance)
}
type TrivialStrategy ¶
type TrivialStrategy struct{}
func (*TrivialStrategy) Finalize ¶
func (u *TrivialStrategy) Finalize(m Model) Model
func (*TrivialStrategy) Init ¶
func (u *TrivialStrategy) Init(m Model, iterations int)
func (*TrivialStrategy) Update ¶
func (u *TrivialStrategy) Update(m Model)
type UnsupervisedTrainer ¶
type UnsupervisedTrainer interface {
Train(instances []Instance)
}
unused, here for completeness
Click to show internal directories.
Click to hide internal directories.