File: predict.knn3.Rd

package info (click to toggle)
r-cran-caret 7.0-1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,036 kB
  • sloc: ansic: 210; sh: 10; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 1,002 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/knn3.R
\name{predict.knn3}
\alias{predict.knn3}
\title{Predictions from k-Nearest Neighbors}
\usage{
\method{predict}{knn3}(object, newdata, type = c("prob", "class"), ...)
}
\arguments{
\item{object}{object of class \code{knn3}.}

\item{newdata}{a data frame of new observations.}

\item{type}{return either the predicted class or the proportion of the votes
for the winning class.}

\item{...}{additional arguments.}
}
\value{
Either the predicted class or the proportion of the votes for each
class.
}
\description{
Predict the class of a new observation based on k-NN.
}
\details{
This function is a method for the generic function \code{\link{predict}} for
class \code{knn3}. For the details see \code{\link{knn3}}. This is
essentially a copy of \code{\link[ipred]{predict.ipredknn}}.
}
\author{
\code{\link[ipred]{predict.ipredknn}} by Torsten.Hothorn
<Torsten.Hothorn@rzmail.uni-erlangen.de>
}
\keyword{multivariate}