classifier

package
v0.0.0-...-14a59ba Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlgorithmRun

func AlgorithmRun(ctx *cli.Context) (err error)

func AlgorithmRunOnDataSet

func AlgorithmRunOnDataSet(classifier Classifier, trainSet, testSet *core.DataSet) (float64, []*eval.LabelPrediction)

func Commands

func Commands() []cli.Command

func MultiClassRun

func MultiClassRun(ctx *cli.Context) (err error)

func MultiClassRunOnDataSet

func MultiClassRunOnDataSet(classifier MultiClassClassifier, trainSet, testSet *core.DataSet) (accuracy float64, predictLabels []int)

Types

type Classifier

type Classifier interface {
	internal.Algorithm
	//Train model on a given dataset
	Train(dataset *core.DataSet)
	//Predict the probability of a sample to be positive sample
	Predict(sample *core.Sample) float64
	SaveModel(path string)
	LoadModel(path string)
}

func GetClassifier

func GetClassifier(method string) Classifier

type MultiClassClassifier

type MultiClassClassifier interface {
	internal.Algorithm
	//Train model on a given dataset
	Train(dataset *core.DataSet)
	//Predict the probability of a sample to be positive sample
	PredictMultiClass(sample *core.Sample) *core.ArrayVector
	SaveModel(path string)
	LoadModel(path string)
}

func GetMutliClassClassifier

func GetMutliClassClassifier(method string) MultiClassClassifier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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