Description Usage Arguments Value See Also Examples
Create a confusion matrix from two vectors of labels: predicted label obtained from FetchBuddle() as a result of prediction and true label of a test set.
1 | MakeConfusionMatrix(predicted.label, true.label, Label)
|
predicted.label |
a vector of predicted labels. |
true.label |
a vector of true labels. |
Label |
a vector of all possible values or levels which a label can take. |
An r-by-r confusion matrix where r is the length of Label.
CheckNonNumeric(), GetPrecision(), FetchBuddle(), OneHot2Label(), Split2TrainTest(), TrainBuddle()
1 2 3 4 5 6 7 8 9 10 11 12 | data(iris)
Label = c("setosa", "versicolor", "virginica")
predicted.label = c("setosa", "setosa", "virginica", "setosa", "versicolor", "versicolor")
true.label = c("setosa", "virginica", "versicolor","setosa", "versicolor", "virginica")
confusion.matrix = MakeConfusionMatrix(predicted.label, true.label, Label)
precision = GetPrecision(confusion.matrix)
confusion.matrix
precision
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.