model

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllOut bool = false

Functions

func MakeFeature

func MakeFeature(transition, i int, feat interface{}) interface{}

Types

type AveragedModelStrategy

type AveragedModelStrategy struct {
	P, N int
	// contains filtered or unexported fields
}

func (*AveragedModelStrategy) Finalize

func (*AveragedModelStrategy) Init

func (u *AveragedModelStrategy) Init(m perceptron.Model, iterations int)

func (*AveragedModelStrategy) Update

func (u *AveragedModelStrategy) Update(m perceptron.Model)

type AvgMatrixSparse

type AvgMatrixSparse struct {
	Mat                  []*AvgSparse
	Features, Generation int
	Formatters           []util.Format
	Log                  bool
	Extractor            *transition.GenericExtractor
}

func NewAvgMatrixSparse

func NewAvgMatrixSparse(features int, formatters []util.Format, dense bool) *AvgMatrixSparse

func (*AvgMatrixSparse) Add

func (t *AvgMatrixSparse) Add(features interface{}) perceptron.Model

func (*AvgMatrixSparse) AddModel

func (t *AvgMatrixSparse) AddModel(m perceptron.Model)

func (*AvgMatrixSparse) AddSubtract

func (t *AvgMatrixSparse) AddSubtract(goldFeatures, decodedFeatures interface{}, amount int64)

func (*AvgMatrixSparse) Copy

func (t *AvgMatrixSparse) Copy() perceptron.Model

func (*AvgMatrixSparse) Deserialize

func (t *AvgMatrixSparse) Deserialize(data *AvgMatrixSparseSerialized)

func (*AvgMatrixSparse) IncrementGeneration

func (t *AvgMatrixSparse) IncrementGeneration()

func (*AvgMatrixSparse) Integrate

func (t *AvgMatrixSparse) Integrate()

func (*AvgMatrixSparse) Make

func (t *AvgMatrixSparse) Make(dense bool) perceptron.Model

func (*AvgMatrixSparse) New

func (t *AvgMatrixSparse) New() perceptron.Model

func (*AvgMatrixSparse) ScalarDivide

func (t *AvgMatrixSparse) ScalarDivide(val int64)

func (*AvgMatrixSparse) Score

func (t *AvgMatrixSparse) Score(features interface{}) int64

func (*AvgMatrixSparse) Serialize

func (t *AvgMatrixSparse) Serialize(generation int) *AvgMatrixSparseSerialized

func (*AvgMatrixSparse) SetTransitionScores

func (t *AvgMatrixSparse) SetTransitionScores(features []Feature, scores ScoredStore, integrated bool)

func (*AvgMatrixSparse) String

func (t *AvgMatrixSparse) String() string

func (*AvgMatrixSparse) Subtract

func (t *AvgMatrixSparse) Subtract(features interface{}) perceptron.Model

func (*AvgMatrixSparse) TransitionScore

func (t *AvgMatrixSparse) TransitionScore(transition transition.Transition, features []Feature) int64

type AvgMatrixSparseSerialized

type AvgMatrixSparseSerialized struct {
	Generation int
	Features   []string
	Mat        []interface{}
}

type Interface

type Interface interface {
	perceptron.Model
	TransitionScore(transition Transition, features []Feature) int64
}

type TransitionClassifier

type TransitionClassifier func(transition.Transition) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL