- yint
number of the given class of each case. Can contain NA
's.
- y
given class label of each case. Can contain NA
's.
- levels
levels of y
- predint
predicted class number of each case. Always exists.
- pred
predicted label of each case.
- altint
number of the alternative class. Among the classes different from the given class, it is the one with the highest posterior probability. Is NA
for cases whose y
is missing.
- altlab
label of the alternative class. Is NA
for cases whose y
is missing.
- PAC
probability of the alternative class. Is NA
for cases whose y
is missing.
- figparams
parameters used to compute fig
.
- fig
distance of each case \(i\) from each class \(g\). Always exists.
- farness
farness of each case from its given class. Is NA
for cases whose y
is missing.
- ofarness
for each case \(i\), its lowest fig[i,g]
to any class \(g\). Always exists.
- k
the requested number of nearest neighbors, from the arguments. Will also be used for classifying new data.
- ktrues
for each case this contains the actual number of elements in its neighborhood. This can be higher than k
due to ties.
- counts
a matrix with 3 columns, each row representing a case. For the neighborhood of each case it says how many members it has from the given class, the predicted class, and the alternative class. The first and third entry is NA
for cases whose y
is missing.
- X
If the argument X
was a data frame or matrix of coordinates, as.matrix(X)
is returned here. This is useful for classifying new data.