Learn R Programming

WMDB (version 1.0)

WMDB-package: Discriminant Analysis Methods by Weight Mahalanobis Distance and bayes

Description

Distance discriminant analysis method is one of classification methods according to multiindex performance parameters.However,the traditional Mahalanobis distance discriminant method treats with the importance of all parameters equally,and exaggerates the role of parameters which changes a little.The weighted Mahalanobis distance is used in discriminant analysis method to distinguish the importance of each parameter.In the concrete application,firstly based on the principal component analysis scheme,a new group of parameters and their corresponding percent contributions of the parameters are calculated ,and the weighted matrix is regarded as the diagonal matrix of the contributions rates.Setting data to standardization,then the weighted Mahalanobis distance can be calculated.Besides the methods metioned above,bayes method is also given.

Arguments

Details

Package:
WMD
Type:
Package
Version:
1.0
Date:
2012-06-28
License:
GPL (>= 2)

References

Statistical modeling and R software,whose author is Yi Xue

Examples

Run this code
##all parameters equal
X=iris[,1:4]
G=gl(3,50)
wmd(X,G,diag(rep(0.25,4)))
##not all parameters equal
X=iris[,1:4]
G=gl(3,50)
wmd(X,G)
##using bias method to distinguish classes
X<-iris[,1:4]
G<-gl(3,50)
dbayes(X,G)

Run the code above in your browser using DataLab