All Projects → terrytangyuan → lfda

terrytangyuan / lfda

Licence: other
Local Fisher Discriminant Analysis in R

Programming Languages

r
7636 projects
TeX
3793 projects

Projects that are alternatives of or similar to lfda

dml
R package for Distance Metric Learning
Stars: ✭ 58 (-21.62%)
Mutual labels:  dimensionality-reduction, metric-learning, distance-metric-learning
GeDML
Generalized Deep Metric Learning.
Stars: ✭ 30 (-59.46%)
Mutual labels:  metric-learning
GPQ
Generalized Product Quantization Network For Semi-supervised Image Retrieval - CVPR 2020
Stars: ✭ 60 (-18.92%)
Mutual labels:  metric-learning
TreeRep
Learning Tree structures and Tree metrics
Stars: ✭ 18 (-75.68%)
Mutual labels:  metric-learning
DRComparison
Comparison of dimensionality reduction methods
Stars: ✭ 29 (-60.81%)
Mutual labels:  dimensionality-reduction
uapca
Uncertainty-aware principal component analysis.
Stars: ✭ 16 (-78.38%)
Mutual labels:  dimensionality-reduction
partition
A fast and flexible framework for data reduction in R
Stars: ✭ 33 (-55.41%)
Mutual labels:  dimensionality-reduction
MHCLN
Deep Metric and Hash Code Learning Network for Content Based Retrieval of Remote Sensing Images
Stars: ✭ 30 (-59.46%)
Mutual labels:  metric-learning
ParametricUMAP paper
Parametric UMAP embeddings for representation and semisupervised learning. From the paper "Parametric UMAP: learning embeddings with deep neural networks for representation and semi-supervised learning" (Sainburg, McInnes, Gentner, 2020).
Stars: ✭ 132 (+78.38%)
Mutual labels:  dimensionality-reduction
S-WMD
Code for Supervised Word Mover's Distance (SWMD)
Stars: ✭ 90 (+21.62%)
Mutual labels:  metric-learning
tf retrieval baseline
A Tensorflow retrieval (space embedding) baseline. Metric learning baseline on CUB and Stanford Online Products.
Stars: ✭ 39 (-47.3%)
Mutual labels:  metric-learning
Machine Learning
A repository of resources for understanding the concepts of machine learning/deep learning.
Stars: ✭ 29 (-60.81%)
Mutual labels:  dimensionality-reduction
moses
Streaming, Memory-Limited, r-truncated SVD Revisited!
Stars: ✭ 19 (-74.32%)
Mutual labels:  dimensionality-reduction
triplet-loss-pytorch
Highly efficient PyTorch version of the Semi-hard Triplet loss ⚡️
Stars: ✭ 79 (+6.76%)
Mutual labels:  metric-learning
enstop
Ensemble topic modelling with pLSA
Stars: ✭ 104 (+40.54%)
Mutual labels:  dimensionality-reduction
sef
A Python Library for Similarity-based Dimensionality Reduction
Stars: ✭ 24 (-67.57%)
Mutual labels:  dimensionality-reduction
CVPR2020 PADS
(CVPR 2020) This repo contains code for "PADS: Policy-Adapted Sampling for Visual Similarity Learning", which proposes learnable triplet mining with Reinforcement Learning.
Stars: ✭ 57 (-22.97%)
Mutual labels:  metric-learning
FastAP-metric-learning
Code for CVPR 2019 paper "Deep Metric Learning to Rank"
Stars: ✭ 93 (+25.68%)
Mutual labels:  metric-learning
topometry
A comprehensive dimensional reduction framework to recover the latent topology from high-dimensional data.
Stars: ✭ 64 (-13.51%)
Mutual labels:  dimensionality-reduction
Deep-Metric-Embedding
Papers and Codes about Deep Metric Learning/Deep Embedding
Stars: ✭ 37 (-50%)
Mutual labels:  metric-learning

Coverage Status CRAN_Status_Badge Downloads from the RStudio CRAN mirror License DOI DOI

lfda

R package for performing and visualizing Local Fisher Discriminant Analysis, Kernel Local Fisher Discriminant Analysis, and Semi-supervised Local Fisher Discriminant Analysis. It's the first package with those methods implemented in native R language. It also provides visualization functions to easily visualize the dimension reduction results.

Introduction to the algorithms and their application can be found here and here. These methods are widely applied in feature extraction, dimensionality reduction, clustering, classification, information retrieval, and computer vision problems. An introduction to the package is also available in Chinese here.

Welcome any feedback and pull request.

Install the current release from CRAN:

install.packages('lfda')

Install the latest development version from github:

devtools::install_github('terrytangyuan/lfda')

Citation

Please call citation("lfda") in R to properly cite this software. A white paper is published on Journal of Open Source Software here.

Examples

Local Fisher Discriminant Analysis(LFDA)

Suppose we want to reduce the dimensionality of the original data set (we are using iris data set here) to 3, then we can run the following:

k <- iris[,-5] # this matrix contains all the predictors to be transformed
y <- iris[,5] # this should be a vector that represents different classes
r <- 3 # dimensionality of the resulting matrix

# run the model, note that two other kinds metrics we can use: 'weighted' and 'orthonormalized'
model <- lfda(k, y, r, metric = "plain") 

plot(model, y) # 3D visualization of the resulting transformed data set

predict(model, iris[,-5]) # transform new data set using predict

Kernel Local Fisher Discriminant Analysis(KLFDA)

The main usage is the same except for an additional kmatrixGauss call to the original data set to perform a kernel trick:

k <- kmatrixGauss(iris[,-5])
y <- iris[,5]
r <- 3
model <- klfda(k, y, r, metric = "plain")

Note that the predict method for klfda is still under development. The plot method works the same way as in lfda.

Semi-supervised Local Fisher Discriminant Analysis(SELF)

This algorithm requires one additional argument such as beta that represents the degree of semi-supervisedness. Let's assume we ignore 10% of the labels in iris data set:

k <- iris[,-5]
y <- iris[,5]
r <- 3
model <- self(k, y, beta = 0.1, r = 3, metric = "plain")

The methods predict and plot work the same way as in lfda.

Integration with {ggplot2::autoplot}

{ggplot2::autoplot} has been integrated with this package. Now {lfda} can be plotted in 2D easily and beautifully using {ggfortify} package. Go to this link and scroll down to the last section for an example.

Contribute & Code of Conduct

To contribute to this project, please take a look at the Contributing Guidelines first. Please note that this project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Contact

Contact the maintainer of this package: Yuan Tang [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].