eval

package
Version: v0.0.0-...-7def386 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2014 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccuracyEvaluator

type AccuracyEvaluator struct {
}

Accuracy evaluator

func (*AccuracyEvaluator) Evaluate

func (e *AccuracyEvaluator) Evaluate(m supervised.Model, set data.Dataset) (result Evaluation)

type ConfusionMatrixEvaluator

type ConfusionMatrixEvaluator struct {
}

输出模型的混淆矩阵

func (*ConfusionMatrixEvaluator) Evaluate

func (e *ConfusionMatrixEvaluator) Evaluate(m supervised.Model, set data.Dataset) (result Evaluation)

输出的度量名字为 "confusion:M/N" 其中M为真实标注,N为预测标注

type Evaluation

type Evaluation struct {
	Metrics map[string]float64
}

func CrossValidate

func CrossValidate(trainer supervised.Trainer, set data.Dataset,
	evals *Evaluators, folds int) (output Evaluation)

进行N-fold cross-validation,输出评价

type Evaluator

type Evaluator interface {
	Evaluate(m supervised.Model, set data.Dataset) Evaluation
}

type Evaluators

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

包含一个评价器的集合

func NewEvaluators

func NewEvaluators(evaluators []Evaluator) *Evaluators

func (*Evaluators) Evaluate

func (evals *Evaluators) Evaluate(m supervised.Model, set data.Dataset) Evaluation

type PREvaluator

type PREvaluator struct {
}

Precision-recall-accuracy evaluator 仅当模型是二分类问题时输出有意义

func (*PREvaluator) Evaluate

func (e *PREvaluator) Evaluate(m supervised.Model, set data.Dataset) (result Evaluation)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL