lfda

lfda: Local Fisher Discriminant Analysis in R - Published in JOSS (2019)

https://github.com/terrytangyuan/lfda

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

dimensionality-reduction distance-metric-learning machine-learning metric-learning r statistics
Last synced: 6 months ago · JSON representation

Repository

Local Fisher Discriminant Analysis in R

Basic Info
  • Host: GitHub
  • Owner: terrytangyuan
  • License: other
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 111 KB
Statistics
  • Stars: 76
  • Watchers: 19
  • Forks: 14
  • Open Issues: 0
  • Releases: 4
Topics
dimensionality-reduction distance-metric-learning machine-learning metric-learning r statistics
Created over 10 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog Contributing License

README.md

Note: This package has been maintained by @terrytangyuan since 2015. Please consider sponsoring!

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:

{R} install.packages('lfda')

Install the latest development version from github:

{R} 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: ```{R} 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: ```{R} k <- kmatrixGauss(iris[,-5]) y <- iris[,5] r <- 3 model <- klfda(k, y, r, metric = "plain")

`` Note that thepredictmethod for klfda is still under development. Theplotmethod works the same way as inlfda`.

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: ```{R} k <- iris[,-5] y <- iris[,5] r <- 3 model <- self(k, y, beta = 0.1, r = 3, metric = "plain")

`` The methodspredictandplotwork the same way as inlfda`.

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 terrytangyuan@gmail.com

Owner

  • Name: Yuan Tang
  • Login: terrytangyuan
  • Kind: user
  • Location: USA
  • Company: Red Hat

Principal Engineer at Red Hat | Project Lead @argoproj @kubeflow | Maintainer @tensorflow XGBoost | ML/AI Infrastructure | Author | Speaker | Technical Advisor

JOSS Publication

lfda: Local Fisher Discriminant Analysis in R
Published
July 30, 2019
Volume 4, Issue 39, Page 1572
Authors
Yuan Tang ORCID
Ant Financial Services Group, San Mateo, CA 94402, USA
Wenxuan Li
Purdue University, West Lafayette, IN 47907, USA
Editor
Arfon Smith ORCID
Tags
distance metric learning statistics clustering machine learning dimensionality reduction local fisher discriminant analysis

Papers & Mentions

Total mentions: 1

Tissue and regional expression patterns of dicistronic tRNA–mRNA transcripts in grapevine (Vitis vinifera) and their evolutionary co-appearance with vasculature in land plants
Last synced: 4 months ago

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 111
  • Total Committers: 2
  • Avg Commits per committer: 55.5
  • Development Distribution Score (DDS): 0.063
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
terrytangyuan t****n@g****m 104
Zach Mayer z****r@g****m 7

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 23
  • Total pull requests: 8
  • Average time to close issues: 2 months
  • Average time to close pull requests: about 7 hours
  • Total issue authors: 6
  • Total pull request authors: 1
  • Average comments per issue: 2.13
  • Average comments per pull request: 3.5
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • terrytangyuan (11)
  • strengejacke (6)
  • sctyner (3)
  • VitoRudolf (1)
  • xiaofangyuan (1)
  • dnpurdy (1)
Pull Request Authors
  • zachmayer (8)
Top Labels
Issue Labels
enhancement (9) help wanted (8) new model (2) question (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 1,649 last-month
  • Total docker downloads: 479
  • Total dependent packages: 4
    (may contain duplicates)
  • Total dependent repositories: 8
    (may contain duplicates)
  • Total versions: 6
  • Total maintainers: 1
cran.r-project.org: lfda

Local Fisher Discriminant Analysis

  • Versions: 5
  • Dependent Packages: 3
  • Dependent Repositories: 8
  • Downloads: 1,649 Last month
  • Docker Downloads: 479
Rankings
Forks count: 3.6%
Stargazers count: 5.0%
Docker downloads count: 6.4%
Average: 7.7%
Downloads: 9.6%
Dependent repos count: 10.7%
Dependent packages count: 10.8%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: r-lfda
  • Versions: 1
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent packages count: 28.8%
Average: 32.0%
Forks count: 32.0%
Stargazers count: 33.0%
Dependent repos count: 34.0%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.1.0 depends
  • grDevices * imports
  • plyr * imports
  • rARPACK * imports
  • rgl * suggests
  • testthat * suggests