Relevant Component Analysis (RCA) tries to find a linear transformation of the feature space such that the effect of irrelevant variability is reduced in the transformed space.

Relevant Component Analysis (RCA) for supervised distance metric learning.
Install RECA from CRAN:
install.packages("RECA")
Or try the development version on GitHub:
# install.packages("remotes")
remotes::install_github("nanxstats/RECA")
To contribute to this project, please take a look at the Contributing Guidelines first. Please note that the RECA project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.