package
0.0.0-20230505210105-3ee970353c38
Repository: https://github.com/ep2012/golearn.git
Documentation: pkg.go.dev
# Functions
GenerateCrossFoldValidationConfusionMatrices divides the data into a number of folds then trains and evaluates the classifier on each fold, producing a new ConfusionMatrix.
GetAccuracy computes the overall classification accuracy That is (number of correctly classified instances) / total instances.
GetConfusionMatrix builds a ConfusionMatrix from a set of reference (`ref') and generate (`gen') Instances.
GetCrossValidatedMetric returns the mean and variance of the confusion-matrix-derived metric across all folds.
GetF1Score computes the harmonic mean of precision and recall (equivalently called F-measure).
GetFalseNegatives returns the number of times an entry is incorrectly predicted as something other than the given class.
GetFalsePositives returns the number of times an entry is incorrectly predicted as having a given class.
GetMacroPrecision assesses Classifier performance across all classes by averaging the precision measures achieved for each class.
GetMacroRecall assesses Classifier performance across all classes by averaging the recall measures achieved for each class.
GetMicroPrecision assesses Classifier performance across all classes using the total true positives and false positives.
GetMicroRecall assesses Classifier performance across all classes using the total true positives and false negatives.
GetPrecision returns the fraction of of the total predictions for a given class which were correct.
GetRecall returns the fraction of the total occurrences of a given class which were predicted.
GetSummary returns a table of precision, recall, true positive, false positive, and true negatives for each class for a given ConfusionMatrix.
GetTrueNegatives returns the number of times an entry is correctly predicted as something other than the given class.
GetTruePositives returns the number of times an entry is predicted successfully in a given ConfusionMatrix.
ShowConfusionMatrix return a human-readable version of a given ConfusionMatrix.
# Type aliases
ConfusionMatrix is a nested map of actual and predicted class counts.