Documentation
¶
Index ¶
- type Evaluation
- func (e *Evaluation) Add(labeledClass, predictedClass string)
- func (e *Evaluation) AddDistance(n *neural.Network, in, ideal []float64) float64
- func (e *Evaluation) AddRegression(label, predicted float64)
- func (e *Evaluation) GetAccuracy(label string) float64
- func (e *Evaluation) GetBalancedAccuracy(label string) float64
- func (e *Evaluation) GetCorrectRatio() float64
- func (e *Evaluation) GetDistance() float64
- func (e *Evaluation) GetFMeasure(label string) float64
- func (e *Evaluation) GetFallout(label string) float64
- func (e *Evaluation) GetFalseDiscoveryRate(label string) float64
- func (e *Evaluation) GetFalseNegatives(label string) int
- func (e *Evaluation) GetFalsePositiveRate(label string) float64
- func (e *Evaluation) GetFalsePositives(label string) int
- func (e *Evaluation) GetInformedness(label string) float64
- func (e *Evaluation) GetMarkedness(label string) float64
- func (e *Evaluation) GetNegativePredictionValue(label string) float64
- func (e *Evaluation) GetNegatives(label string) int
- func (e *Evaluation) GetOverallAccuracy() float64
- func (e *Evaluation) GetOverallBalancedAccuracy() float64
- func (e *Evaluation) GetOverallFMeasure() float64
- func (e *Evaluation) GetPositives(label string) int
- func (e *Evaluation) GetPrecision(label string) float64
- func (e *Evaluation) GetRecall(label string) float64
- func (e *Evaluation) GetSensitivity(label string) float64
- func (e *Evaluation) GetSpecificity(label string) float64
- func (e *Evaluation) GetTrueNegatives(label string) int
- func (e *Evaluation) GetTruePositives(label string) int
- func (e *Evaluation) PrintConfusionMatrix()
- func (e *Evaluation) PrintRegressionSummary()
- func (e *Evaluation) PrintSummaries()
- func (e *Evaluation) PrintSummary(label string)
- func (e *Evaluation) SetRegressionThreshold(threshold float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evaluation ¶
type Evaluation struct { Confusion map[string]map[string]int Correct int Wrong int OverallDistance float64 Usage neural.NetworkType Threshold float64 }
Evaluation contains all the structures necessary for the evaluation
func NewEvaluation ¶
func NewEvaluation(usage neural.NetworkType, classes []string) *Evaluation
NewEvaluation creates a new evaluation object
func (*Evaluation) Add ¶
func (e *Evaluation) Add(labeledClass, predictedClass string)
Add adds a new data point to the evaluation
func (*Evaluation) AddDistance ¶
func (e *Evaluation) AddDistance(n *neural.Network, in, ideal []float64) float64
AddDistance adds distance between ideal output and output of the network
func (*Evaluation) AddRegression ¶
func (e *Evaluation) AddRegression(label, predicted float64)
AddRegression add a predicted regresssion value to tht set
func (*Evaluation) GetAccuracy ¶
func (e *Evaluation) GetAccuracy(label string) float64
GetAccuracy (TP+TN) / (P+N)
func (*Evaluation) GetBalancedAccuracy ¶
func (e *Evaluation) GetBalancedAccuracy(label string) float64
GetBalancedAccuracy (TP/P + TN/N) / 2
func (*Evaluation) GetCorrectRatio ¶
func (e *Evaluation) GetCorrectRatio() float64
GetCorrectRatio returns correct classified samples ratio
func (*Evaluation) GetDistance ¶
func (e *Evaluation) GetDistance() float64
GetDistance returns the distance from the evaluation
func (*Evaluation) GetFMeasure ¶
func (e *Evaluation) GetFMeasure(label string) float64
GetFMeasure 2TP/(2TP+FP+FN)
func (*Evaluation) GetFallout ¶
func (e *Evaluation) GetFallout(label string) float64
GetFallout FP / N
func (*Evaluation) GetFalseDiscoveryRate ¶
func (e *Evaluation) GetFalseDiscoveryRate(label string) float64
GetFalseDiscoveryRate FP / (FP+TP)
func (*Evaluation) GetFalseNegatives ¶
func (e *Evaluation) GetFalseNegatives(label string) int
GetFalseNegatives returns FNs
func (*Evaluation) GetFalsePositiveRate ¶
func (e *Evaluation) GetFalsePositiveRate(label string) float64
GetFalsePositiveRate same as fallout
func (*Evaluation) GetFalsePositives ¶
func (e *Evaluation) GetFalsePositives(label string) int
GetFalsePositives returns FP
func (*Evaluation) GetInformedness ¶
func (e *Evaluation) GetInformedness(label string) float64
GetInformedness = Sensitivity + Specificity − 1
func (*Evaluation) GetMarkedness ¶
func (e *Evaluation) GetMarkedness(label string) float64
GetMarkedness = Precision + NegativePredictionValue − 1
func (*Evaluation) GetNegativePredictionValue ¶
func (e *Evaluation) GetNegativePredictionValue(label string) float64
GetNegativePredictionValue TN/(TN+FN)
func (*Evaluation) GetNegatives ¶
func (e *Evaluation) GetNegatives(label string) int
GetNegatives FP + TN
func (*Evaluation) GetOverallAccuracy ¶
func (e *Evaluation) GetOverallAccuracy() float64
GetOverallAccuracy calculates for the training evaluation
func (*Evaluation) GetOverallBalancedAccuracy ¶
func (e *Evaluation) GetOverallBalancedAccuracy() float64
GetOverallBalancedAccuracy calculates for the training evaluation
func (*Evaluation) GetOverallFMeasure ¶
func (e *Evaluation) GetOverallFMeasure() float64
GetOverallFMeasure calculates for the training evaluation
func (*Evaluation) GetPositives ¶
func (e *Evaluation) GetPositives(label string) int
GetPositives TP + FN
func (*Evaluation) GetPrecision ¶
func (e *Evaluation) GetPrecision(label string) float64
GetPrecision TP/(TP+FP)
func (*Evaluation) GetRecall ¶
func (e *Evaluation) GetRecall(label string) float64
GetRecall TP/P, TP/(TP + FN)
func (*Evaluation) GetSensitivity ¶
func (e *Evaluation) GetSensitivity(label string) float64
GetSensitivity like recall
func (*Evaluation) GetSpecificity ¶
func (e *Evaluation) GetSpecificity(label string) float64
GetSpecificity TN / N, TN/(FP+TN)
func (*Evaluation) GetTrueNegatives ¶
func (e *Evaluation) GetTrueNegatives(label string) int
GetTrueNegatives returns TN
func (*Evaluation) GetTruePositives ¶
func (e *Evaluation) GetTruePositives(label string) int
GetTruePositives returns TP
func (*Evaluation) PrintConfusionMatrix ¶
func (e *Evaluation) PrintConfusionMatrix()
PrintConfusionMatrix prints the confusion matrix of the evaluation
func (*Evaluation) PrintRegressionSummary ¶
func (e *Evaluation) PrintRegressionSummary()
PrintRegressionSummary returns a summary of the evaluated regression
func (*Evaluation) PrintSummaries ¶
func (e *Evaluation) PrintSummaries()
PrintSummaries prints the summaries of all classes
func (*Evaluation) PrintSummary ¶
func (e *Evaluation) PrintSummary(label string)
PrintSummary returns a summary
func (*Evaluation) SetRegressionThreshold ¶
func (e *Evaluation) SetRegressionThreshold(threshold float64)
SetRegressionThreshold sets the threshold if you are trying to do Pos / Neg with a regressor