MINI MINI MANI MO

Path : /opt/oracle/product/18c/dbhomeXE/R/library/OREpredict/doc/man/en/
File Upload :
Current File : //opt/oracle/product/18c/dbhomeXE/R/library/OREpredict/doc/man/en/ore.predict-matrix.Rd

%
% Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 
%
\name{ore.predict-matrix}
\alias{ore.predict-matrix}
\alias{ore.predict,matrix-method}
\title{Oracle R Enterprise Predictions Using Distances to Rows in a Matrix}
\description{
  Oracle R Enterprise method for generating predictions using rows of a
  data matrix. For each row in argument \code{newdata}, the distances
  to each row in argument \code{object} are computed and either those
  distances or the row number from argument \code{object} with the
  minimum distance is returned.
}
\usage{
  \S4method{ore.predict}{matrix}(object, newdata, type = c("classes", "distances"),
            method = "euclidean", p = 2, na.action = na.pass, ...)
}
\arguments{
  \item{object}{A \code{\link[base]{matrix}} object with no more than
    1000 rows.}
  \item{newdata}{An \code{\link[OREbase:ore.frame-class]{ore.frame}}
    object.}
  \item{type}{A character string specifying the type of prediction to
    make; either \code{"classes"} (row id) or \code{"distances"}.}
  \item{method}{A character string specifying the distance measure to
    use; either \code{"euclidean"}, \code{"maximum"},
    \code{"manhattan"}, \code{"canberra"}, or \code{"minkowski"}. See
    function \code{\link[stats]{dist}} for further explanations.}
  \item{p}{The power of the Minkowski distance when argument
    \code{method} is \code{"minkowski"}.}
  \item{na.action}{The manner in which \code{NA} values are handled,
    either \code{na.omit} or \code{na.pass}.}
  \item{\dots}{Optional arguments.}
}
\value{
  If argument \code{type} is \code{"classes"}, returns an
  \code{\link[OREbase:ore.integer-class]{ore.integer}} object of row
  number references to argument \code{object}.

  If argument \code{type} is \code{"distances"}, returns an
  \code{\link[OREbase:ore.frame-class]{ore.frame}} object with one
  column for each row in argument \code{object}.
}
\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-kmeans}},
  \code{\link[stats]{dist}}.
}
\examples{
groups <- cutree(hclust(dist(iris[1:4], "manhattan")), 3)
centers <- do.call(rbind, lapply(split(iris[1:4], groups), colMeans))
rownames(centers) <- sprintf("DISTANCE\%d", 1:3)
IRIS <- ore.push(iris)
IRIS$CLUSTER <- ore.predict(centers, IRIS, method = "manhattan")
IRIS <- cbind(IRIS, ore.predict(centers, IRIS, type = "distances",
                                method = "manhattan"))
head(IRIS)
table(IRIS$CLUSTER, IRIS$Species)
}
\keyword{multivariate}
\keyword{cluster}

OHA YOOOO