predict.dgpage_projector | R Documentation |
dgpage_projector
objectExtends the discriminant methods with a method="1nn"
option that
uses Rnanoflann for 1-nearest-neighbor classification in the projected space.
## S3 method for class 'dgpage_projector'
predict(
object,
new_data,
method = c("1nn", "lda", "euclid"),
type = c("class", "prob"),
k = 1,
...
)
object |
A |
new_data |
A numeric matrix (m x d). |
method |
One of |
type |
If |
k |
Number of neighbors if using |
... |
Not used (or pass |
Otherwise, if method
is "lda"
or "euclid"
, we fall back to the
standard predict.discriminant_projector
method for linear discriminant
or Euclidean nearest-mean classification in subspace.
If method="1nn"
, a factor vector of length m
.
If method
is "lda"
or "euclid"
and type="class"
,
a factor of length m
.
If method="lda"
or "euclid"
and type="prob"
, an
m x nclass
matrix of posterior-like values.
predict.discriminant_projector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.