Weighted Distance Based Discriminant Analysis: The R Package WeDiBaDis

The WeDiBaDis package provides a user friendly environment to perform discriminant analysis (supervised classification). WeDiBaDis is an easy to use package addressed to the biological and medical communities, and in general, to researchers interested in applied studies. It can be suitable when the user is interested in the problem of constructing a discriminant rule on the basis of distances between a relatively small number of instances or units of known unbalanced-class membership measured on many (possibly thousands) features of any type. This is a current situation when analyzing genetic biomedical data. This discriminant rule can then be used both, as a means of explaining differences among classes, but also in the important task of assigning the class membership for new unlabeled units. Our package implements two discriminant analysis procedures in an R environment: the well-known distance-based discriminant analysis (DB-discriminant) and a weighted distance-based discriminant (WDB-discriminant), a novel classifier rule that we introduce. This new procedure is based on an improvement of the DB rule taking into account the statistical depth of the units. This article presents both classifying procedures and describes the implementation of each in detail. We illustrate the use of the package using an ecological and a genetic experimental example. Finally, we illustrate the effectiveness of the new proposed procedure (WDB), as compared with DB. This comparison is carried out using thirty-eight, high-dimensional, class-unbalanced, cancer data sets, three of which include clinical features.

Itziar Irigoien , Francesc Mestres , Concepcion Arenas

CRAN packages used

cluster, ICGE, vegan

CRAN Task Views implied by cited packages

Environmetrics, Multivariate, Cluster, Phylogenetics, Psychometrics, Spatial


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Irigoien, et al., "The R Journal: Weighted Distance Based Discriminant Analysis: The R Package WeDiBaDis", The R Journal, 2017

BibTeX citation

  author = {Irigoien, Itziar and Mestres, Francesc and Arenas, Concepcion},
  title = {The R Journal: Weighted Distance Based Discriminant Analysis: The R Package WeDiBaDis},
  journal = {The R Journal},
  year = {2017},
  note = {https://doi.org/10.32614/RJ-2016-057},
  doi = {10.32614/RJ-2016-057},
  volume = {8},
  issue = {2},
  issn = {2073-4859},
  pages = {434-450}