eval

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: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func F1

func F1(precision, recall float64) float64

func Precision

func Precision(truePositives, testPositives int) float64

func Recall

func Recall(truePositives, conditionPositives int) float64

Types

type Error

type Error interface {
	String() string
	Class() string
}

type Errors

type Errors []Error

func (Errors) ByType

func (ers Errors) ByType() map[string]int

type Eval

type Eval func(test, condition interface{}) *Result

type Result

type Result struct {
	TP, FP, TN, FN int
	Errors         Errors
	Other          interface{}
}

func (*Result) Accuracy

func (r *Result) Accuracy() float64

func (*Result) All

func (r *Result) All() int

func (*Result) ConditionNegatives

func (r *Result) ConditionNegatives() int

func (*Result) ConditionPositives

func (r *Result) ConditionPositives() int

func (*Result) Correct

func (r *Result) Correct() int

func (*Result) F1

func (r *Result) F1() float64

func (*Result) Incorrect

func (r *Result) Incorrect() int

func (*Result) Precision

func (r *Result) Precision() float64

func (*Result) Recall

func (r *Result) Recall() float64

func (*Result) TestNegatives

func (r *Result) TestNegatives() int

func (*Result) TestPositives

func (r *Result) TestPositives() int

type Total

type Total struct {
	Result
	Results           []*Result
	Exact, Population int
}

func (*Total) Add

func (t *Total) Add(r *Result)

func (*Total) Errors

func (t *Total) Errors() Errors

func (*Total) ExactMatch

func (t *Total) ExactMatch() float64

Jump to

Keyboard shortcuts

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