matloff / qeML

40 stars 14 forks source link

$confusion not working #13

Closed tibbles-and-tribbles closed 7 months ago

tibbles-and-tribbles commented 7 months ago

Trying to produce the results from 2.5 The Confusion Matrix.

library(regtools)
library(qeML)

vert <- read.table("column_3C.dat", 
                   header = FALSE,
                   stringsAsFactors = TRUE)

set.seed(9999)
knn_model <- qeKNN(vert, "V7", k = 5)

knn_model$confusion

Output:

> knn_model$confusion
NULL

$confusion doesn't even pop up in code complete in RStudio.

matloff commented 7 months ago

The documentation does not state that every function calculates the confusion matrix; most don't. (And of course it would be impossible for the functions involving continuous Y.) The 'regtools' package, included by 'qeML', has a confusion() function, which you can call directly.