predict.lfda: LFDA Transformation/Prediction on New Data

Description Usage Arguments Value Author(s) Examples

View source: R/lfda.R

Description

This function transforms a data set, usually a testing set, using the trained LFDA metric

Usage

1
2
## S3 method for class 'lfda'
predict(object, newdata = NULL, type = "raw", ...)

Arguments

object

The result from lfda function, which contains a transformed data and a transforming matrix that can be used for transforming testing set

newdata

The data to be transformed

type

The output type, in this case it defaults to "raw" since the output is a matrix

...

Additional arguments

Value

the transformed matrix

Author(s)

Yuan Tang

Examples

1
2
3
4
5
k <- iris[, -5]
y <- iris[, 5]
r <- 3
model <- lfda(k, y, r = 4, metric = "plain")
predict(model, iris[, -5])

lfda documentation built on Aug. 1, 2019, 1:04 a.m.