model

package
v0.0.0-...-3be35fb Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateD

func CalculateD(K, yOuter *mat.Dense) *mat.Dense

func CalculateGramMatrix

func CalculateGramMatrix(X *mat.Dense) *mat.Dense

func CalculateYOuterProduct

func CalculateYOuterProduct(y *mat.VecDense) *mat.Dense

Types

type Model

type Model struct {
	X *mat.Dense
	Y mat.Vector
	C float64
	// contains filtered or unexported fields
}

Model is a good model

func NewModel

func NewModel(kernel kernel.Kernel, C, tolerance float64) *Model

NewModel is a good contructor

func (*Model) Classify

func (model *Model) Classify(document mat.Vector) float64

Classify does great things

func (*Model) Train

func (model *Model) Train(maxPasses int)

Train goes chuu chuu

type TweetClassifier

type TweetClassifier struct {
	// contains filtered or unexported fields
}

TweetClassifier is a good thing to have

func NewTweetClassifier

func NewTweetClassifier(kernel kernel.Kernel, C, tolerance float64) *TweetClassifier

NewTweetClassifier is a thing

func (*TweetClassifier) ClassifyTweets

func (clf *TweetClassifier) ClassifyTweets()

func (*TweetClassifier) LoadTestSet

func (clf *TweetClassifier) LoadTestSet(testSet *mat.Dense)

func (*TweetClassifier) LoadTrainingSet

func (clf *TweetClassifier) LoadTrainingSet(documentTermMatrix *mat.Dense, trainingLabels mat.Vector)

LoadTrainingSet is a thing

func (*TweetClassifier) LoadValidationLabels

func (clf *TweetClassifier) LoadValidationLabels(validatonLabelsFilename string)

func (*TweetClassifier) StoreResults

func (clf *TweetClassifier) StoreResults(labelsFilename, statsFilename string)

func (*TweetClassifier) Train

func (clf *TweetClassifier) Train(maxPasses int)

func (*TweetClassifier) Validate

func (clf *TweetClassifier) Validate()

Jump to

Keyboard shortcuts

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