logisticPCA

Dimensionality reduction for binary data

https://github.com/andland/logisticpca

Science Score: 33.0%

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

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    1 of 6 committers (16.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Dimensionality reduction for binary data

Basic Info
  • Host: GitHub
  • Owner: andland
  • License: other
  • Language: HTML
  • Default Branch: master
  • Homepage:
  • Size: 4.58 MB
Statistics
  • Stars: 50
  • Watchers: 8
  • Forks: 9
  • Open Issues: 12
  • Releases: 0
Created over 11 years ago · Last pushed almost 6 years ago
Metadata Files
Readme License

README.md

Logistic PCA

Build Status CRAN_Status_Badge

logisticPCA is an R package for dimensionality reduction of binary data, as described in Landgraf and Lee (2020) (preprint here).

logisticPCA projection

Installation

To install R, visit r-project.org/.

The package can be installed by downloading from CRAN. R install.packages("logisticPCA")

To install the development version, first install devtools from CRAN. Then run the following commands. ```R

install.packages("devtools")

library("devtools") install_github("andland/logisticPCA") ```

Classes

Three types of dimensionality reduction are given. For all the functions, the user must supply the desired dimension k. The data must be an n x d matrix comprised of binary variables (i.e. all 0's and 1's).

Logistic PCA

logisticPCA() estimates the natural parameters of a Bernoulli distribution in a lower dimensional space. This is done by projecting the natural parameters from the saturated model. A rank-k projection matrix, or equivalently a d x k orthogonal matrix U, is solved for to minimize the Bernoulli deviance. Since the natural parameters from the saturated model are either negative or positive infinity, an additional tuning parameter m is needed to approximate them. You can use cv.lpca() to select m by cross validation. Typical values are in the range of 3 to 10.

mu is a main effects vector of length d and U is the d x k loadings matrix.

Logistic SVD

logisticSVD() estimates the natural parameters by a matrix factorization. mu is a main effects vector of length d, B is the d x k loadings matrix, and A is the n x k principal component score matrix.

Convex Logistic PCA

convexLogisticPCA() relaxes the problem of solving for a projection matrix to solving for a matrix in the k-dimensional Fantope, which is the convex hull of rank-k projection matrices. This has the advantage that the global minimum can be obtained efficiently. The disadvantage is that the k-dimensional Fantope solution may have a rank much larger than k, which reduces interpretability. It is also necessary to specify m in this function.

mu is a main effects vector of length d, H is the d x d Fantope matrix, and U is the d x k loadings matrix, which are the first k eigenvectors of H.

Methods

Each of the classes has associated methods to make data analysis easier.

  • print(): Prints a summary of the fitted model.
  • fitted(): Fits the low dimensional matrix of either natural parameters or probabilities.
  • predict(): Predicts the PCs on new data. Can also predict the low dimensional matrix of natural parameters or probabilities on new data.
  • plot(): Either plots the deviance trace, the first two PC loadings, or the first two PC scores using the package ggplot2.

In addition, there are functions for performing cross validation.

  • cv.lpca(), cv.lsvd(), cv.clpca(): Run cross validation over the rows of the matrix to assess the fit of m and/or k.
  • plot.cv(): Plots the results of the cv() method.

Owner

  • Name: Andrew Landgraf
  • Login: andland
  • Kind: user
  • Location: Columbus, OH

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 104
  • Total Committers: 6
  • Avg Commits per committer: 17.333
  • Development Distribution Score (DDS): 0.087
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Andrew Landgraf a****d@g****m 95
wrathematics w****s@g****m 3
Andrew Landgraf a****w@A****l 2
Andrew Landgraf a****d 2
Drew Schmidt s****t@m****u 1
U-Andrew-Desktop\Andrew A****w@A****) 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 26
  • Total pull requests: 1
  • Average time to close issues: 5 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 10
  • Total pull request authors: 1
  • Average comments per issue: 0.38
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • 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
  • andland (17)
  • marsangar (1)
  • drdna (1)
  • novitch (1)
  • jleecurrie (1)
  • OliverPStuart (1)
  • noahaus (1)
  • ayanmandal120 (1)
  • fangzhiwen2019 (1)
  • mashu (1)
Pull Request Authors
  • wrathematics (1)
Top Labels
Issue Labels
enhancement (11) bug (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 317 last-month
  • Total docker downloads: 76
  • Total dependent packages: 1
  • Total dependent repositories: 4
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: logisticPCA

Binary Dimensionality Reduction

  • Versions: 2
  • Dependent Packages: 1
  • Dependent Repositories: 4
  • Downloads: 317 Last month
  • Docker Downloads: 76
Rankings
Stargazers count: 6.7%
Forks count: 7.9%
Dependent repos count: 14.6%
Docker downloads count: 17.5%
Average: 17.9%
Dependent packages count: 18.1%
Downloads: 42.5%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • ggplot2 * imports
  • RSpectra >= 0.10 suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 0.11.0 suggests