predict.nearestCentroid {lolR} | R Documentation |
Nearest Centroid Classifier Prediction
Description
A function that predicts the class of points based on the nearest centroid
Usage
## S3 method for class 'nearestCentroid'
predict(object, X, ...)
Arguments
object |
An object of class
|
X |
|
... |
optional args. |
Value
Yhat [n]
the predicted class of each of the n
data point in X
.
Details
For more details see the help vignette:
vignette("centroid", package = "lolR")
Author(s)
Eric Bridgeford
Examples
library(lolR)
data <- lol.sims.rtrunk(n=200, d=30) # 200 examples of 30 dimensions
X <- data$X; Y <- data$Y
model <- lol.classify.nearestCentroid(X, Y)
Yh <- predict(model, X)
[Package lolR version 2.1 Index]