Prediction function for Kernel Local Fisher Discriminant Analysis (KLFDA) with a Multinomial kernel. Predictions are based on three classifiers. See KLFDA for detail. Results give the class labels and posterior possibility of the tested data.

predict.KLFDA(obj, newdata)

Arguments

obj

The object from KLFDA model

newdata

The tested data

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

%% ...

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.

Author

qinxinghu@gmail.com

See also

KLFDA, predict.klfda_1

Examples

btest=KLFDA(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)
#> [1] "Computing K..." #> [1] "Mean K is 25.153348085363"
pred=predict.KLFDA(btest,as.matrix(iris[1:10,1:4]))
#> Warning: Numerical 0 probability for all classes with observation 1
#> Warning: Numerical 0 probability for all classes with observation 2
#> Warning: Numerical 0 probability for all classes with observation 3
#> Warning: Numerical 0 probability for all classes with observation 4
#> Warning: Numerical 0 probability for all classes with observation 5
#> Warning: Numerical 0 probability for all classes with observation 6
#> Warning: Numerical 0 probability for all classes with observation 7
#> Warning: Numerical 0 probability for all classes with observation 8
#> Warning: Numerical 0 probability for all classes with observation 9
#> Warning: Numerical 0 probability for all classes with observation 10
#> Warning: Numerical 0 probability for all classes with observation 1
#> Warning: Numerical 0 probability for all classes with observation 2
#> Warning: Numerical 0 probability for all classes with observation 3
#> Warning: Numerical 0 probability for all classes with observation 4
#> Warning: Numerical 0 probability for all classes with observation 5
#> Warning: Numerical 0 probability for all classes with observation 6
#> Warning: Numerical 0 probability for all classes with observation 7
#> Warning: Numerical 0 probability for all classes with observation 8
#> Warning: Numerical 0 probability for all classes with observation 9
#> Warning: Numerical 0 probability for all classes with observation 10