MINI MINI MANI MO
%
% Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
%
\name{ore.predict-kmeans}
\alias{ore.predict-kmeans}
\alias{ore.predict,kmeans-method}
\title{
使用 \code{\link[stats]{kmeans}} 模型的 Oracle R Enterprise 預測
}
\description{
使用 \code{\link[stats]{kmeans}} 模型產生預測的 Oracle R Enterprise
方法.
}
\usage{
\S4method{ore.predict}{kmeans}(object, newdata, type = c("classes", "distances"),
na.action = na.pass, ...)
}
\arguments{
\item{object}{
一個 \code{\link[stats]{kmeans}} 模型物件.
}
\item{newdata}{
一個 \code{\link[OREbase:ore.frame-class]{ore.frame}}
物件.
}
\item{type}{
指定要產生何種類型之預測的字元字串;
\code{"classes"} (叢集 ID) 或 \code{"distances"} (叢集
中心的歐幾里得距離) 其中之一.
}
\item{na.action}{
處理 \code{NA} 值的方式,
\code{na.omit} 或 \code{na.pass} 其中之一.
}
\item{\dots}{
選擇性引數.
}
}
\value{
如果引數 \code{type} 為 \code{"classes"}, 會傳回
叢集分類的
\code{\link[OREbase:ore.integer-class]{ore.integer}} 物件.
如果引數 \code{type} 為 \code{"distances"}, 會傳回
\code{\link[OREbase:ore.frame-class]{ore.frame}} 物件, 其中每個
叢集各有一個資料欄.
}
\references{
\href{http://www.oracle.com/technetwork/database/database-technologies/r/r-enterprise/documentation/index.html}{Oracle R Enterprise}
}
\author{
Oracle \email{oracle-r-enterprise@oracle.com}
}
\seealso{
\code{\link{ore.predict}},
\code{\link{ore.predict-matrix}},
\code{\link[stats]{kmeans}}.
}
\examples{
irisClusters <- kmeans(as.matrix(iris[1:4]), centers = 3)
IRIS <- ore.push(iris)
IRIS$CLUSTER <- ore.predict(irisClusters, IRIS)
IRIS <- cbind(IRIS, ore.predict(irisClusters, IRIS, type = "distances"))
head(IRIS)
table(IRIS$CLUSTER, IRIS$Species)
}
\keyword{multivariate}
\keyword{cluster}
OHA YOOOO