
Last chance! 50% off unlimited learning
Sale ends in
Last chance! 50% off unlimited learning
Sale ends in
"predict"(object, dists, type = "class", ...)
oneNN
"class"
for computing the class of
the instances or "prob"
for computing the probabilities of belonging to each class.type
is equal to "class"
a vector of length equal to the rows number
of matrix dists
, containing the predicted labels. If type
is equal
to "prob"
it returns a matrix which has nrow(dists)
rows and a column for every
class, where each cell represents the probability that the instance belongs to the class,
according to 1NN.