KLFDA_mk: Kernel Local Fisher Discriminant Analysis (KLFDA) with...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/KLFDA_mk.R

Description

Kernel Local Fisher Discriminant Analysis (KLFDA). This function implements the Kernel Local Fisher Discriminant Analysis with a Multinomial kernel.

Usage

1
2
3
4
KLFDA_mk(X, Y, r, order, regParam, 
usekernel = TRUE, fL = 0.5, 
priors, tol, reg, metric, 
plotFigures = FALSE, verbose, ...)

Arguments

X

The input training data

Y

The training labels

r

The number of reduced features

order

The order passing to Multinomial Kernel

regParam

The regularization parameter for kernel matrix

usekernel

Whether to used kernel classifier

fL

pass to kernel classifier if usekenel is TRUE

priors

The weight of each class

tol

The tolerance for rejecting uni-variance

reg

The regularization parameter

metric

Type of metric in the embedding space (default: 'weighted') 'weighted' - weighted eigenvectors 'orthonormalized' - orthonormalized 'plain' - raw eigenvectors

plotFigures

whether to plot the reduced features, 3D plot

verbose

silence the processing

...

additional arguments for the classifier

Details

This function uses Multinomial Kernel, users can replace the Multinomial Kernel based on your own purpose. The final discrimination employs three classifiers, the basic linear classifier, the Mabayes (Bayes rule and the Mahalanobis distance), and Niave Bayes classifier.

Value

class

The class labels from linear classifier

posterior

The posterior possibility of each class from linear classifier

bayes_judgement

Discrimintion results using the Mabayes classifier

bayes_assigment

Discrimintion results using the Naive bayes classifier

Z

The reduced features

Author(s)

qinxinghu@gmail.com

References

Sugiyama, M (2007). Dimensionality reduction of multimodal labeled data by local Fisher discriminant analysis. Journal of Machine Learning Research, vol.8, 1027-1061.

Sugiyama, M (2006). Local Fisher discriminant analysis for supervised dimensionality reduction. In W. W. Cohen and A. Moore (Eds.), Proceedings of 23rd International Conference on Machine Learning (ICML2006), 905-912.

Original Matlab Implementation: http://www.ms.k.u-tokyo.ac.jp/software.html#LFDA

Tang, Y., & Li, W. (2019). lfda: Local Fisher Discriminant Analysis inR. Journal of Open Source Software, 4(39), 1572.

Moore, A. W. (2004). Naive Bayes Classifiers. In School of Computer Science. Carnegie Mellon University.

Pierre Enel (2020). Kernel Fisher Discriminant Analysis (https://www.github.com/p-enel/MatlabKFDA), GitHub. Retrieved March 30, 2020.

Karatzoglou, A., Smola, A., Hornik, K., & Zeileis, A. (2004). kernlab-an S4 package for kernel methods in R. Journal of statistical software, 11(9), 1-20.

See Also

predict.KLFDA_mk, klfda_1

Examples

1
2
3
4
5
6
btest=KLFDA_mk(X=as.matrix(iris[,1:4]),
Y=as.matrix(as.data.frame(iris[,5])),r=3,order=2,regParam=0.25, 
usekernel=TRUE,fL=0.5,
priors=NULL,tol=1e-90,reg=0.01,metric =  'plain',plotFigures=FALSE,
verbose=TRUE)
#pred=predict.KLFDA_mk(btest,as.matrix(iris[1:10,1:4]))

DA documentation built on July 12, 2021, 9:07 a.m.