evaluation

package
v0.0.0-...-90b3c1d Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluateAUC

func EvaluateAUC()
Example
EvaluateAUC()
Output:

true  positive rate: [0 0.5 0.5 1 1]
false positive rate: [0 0 0.5 0.5 1]
auc: 0.75

func EvaluateCategoricalData

func EvaluateCategoricalData(b io.Reader)
Example
// Accuracy: 97%! That's pretty good. That means we were right 97% of the time
csvData := data.GetLabeledCategoricalCSVData()
EvaluateCategoricalData(csvData)
Output:

Accuracy = 0.97

func EvaluateCategoricalDataWithClasses

func EvaluateCategoricalDataWithClasses(b io.Reader)
Example
csvData := data.GetLabeledCategoricalCSVData()
EvaluateCategoricalDataWithClasses(csvData)
Output:

Precision (class 0) = 1.00
Recall (class 0) = 1.00
Precision (class 1) = 0.96
Recall (class 1) = 0.94
Precision (class 2) = 0.94
Recall (class 2) = 0.96

func EvaluateContinuousData

func EvaluateContinuousData(b io.Reader)

EvaluateContinuousData prints MSE, MAE, R-Squared

Example
// the MAE is 2.55 and the mean of our observed values is 14.0,
// so our MAE is about 20% of our mean value. Not very good, depending on the context.

// R-squared also gives us a general idea about the deviations of our predictions
// R-squared measures the proportion of the variance in the observed values
// that we capture in the predicted values.
// Remember that R-squared is a percentage and higher percentages are better.
// Here, we are capturing about 37% of the variance in the variable
// that we are trying to predict. Not very good.
EvaluateContinuousData(data.GetContinuousCSVData())
Output:

MAE = 2.55
MSE = 10.51
R^2 = 0.37

Types

This section is empty.

Jump to

Keyboard shortcuts

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