I have a dataset of forest polygons and I am attempting to compare the Field classifications with the Map classifications using a confusion matrix. The only package I could find that would run on a larger dataset (more than 2 classification options) and could compare text values was in the package 'mda'. I have run the package 'mda' and used the code for 'confusion'.
The provided example with the package is...
data(iris)
irisfit <- fda(Species ~ ., data = iris)
confusion(predict(irisfit, iris), iris$Species)
Setosa Versicolor Virginica
Setosa 50 0 0
Versicolor 0 48 1
Virginica 0 2 49
attr(, "error"):
[1] 0.02
I run mine as simply
data(Habitat)
confusion(Habitat$Field,Habitat$Map)
Which gives me a confusion matrix output similar (but not nearly as neat) as the code example provided. At this point I get lost. I have 2 results with mine.
attr(,"error")
[1] 0.3448276
attr(,"mismatch")
[1] 0.889313
Error I understand, mismatch however, I cannot seem to find any hint of online or within the literature that comes with the package. I doubt having such a high "mismatch" value is good, but I have no idea how to interpret it. I figure this is probably a fairly specific question that perhaps could only be answered by someone that has worked with this package before, but if anyone knows, or has a hint on how to find out, I would greatly appreciate it.
Thanks, Ayden
EDIT - To include clips of my dataset, showing what may be the mismatch (suspect it means consistent misclassifications). Shows clips of the most consistent misclassification.
structure(list(Field = structure(c(7L, 7L, 7L, 7L, 7L, 7L, 7L,
7L, 7L, 7L, 7L, 7L, 7L, 8L), .Label = c("Black Spruce ", "Clearcut ",
"Deciduous ", "Jack Pine ", "Lowland Conifer ", "Marshwillow ",
"Mixed Conifer ", "Open Muskeg ", "Rock ", "Treed Muskeg ", "Upland Conifer ",
"Young Conifer", "Young Deciduous"), class = "factor"), Map = structure(c(7L,
7L, 7L, 11L, 11L, 11L, 11L, 11L, 11L, 12L, 13L, 13L, 13L, 6L), .Label = c("Black Spruce", "Clearcut", "Deciduous", "Jack Pine", "Lowland Conifer", "Marshwillow",
"Mixed Conifer", "Open Muskeg", "Rock", "Treed Muskeg", "Upland Conifer",
"Young Conifer", "Young Deciduous"), class = "factor")), .Names = c("Field",
"Map"), row.names = 143:156, class = "data.frame")