https://github.com/neurodata/lollipop
Linear Optimal Low Rank Projection
https://github.com/neurodata/lollipop
Last synced: about 1 year ago
JSON representation
Linear Optimal Low Rank Projection
- Host: GitHub
- URL: https://github.com/neurodata/lollipop
- Owner: neurodata
- License: apache-2.0
- Created: 2018-04-18T02:29:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-14T20:31:34.000Z (almost 7 years ago)
- Last Synced: 2024-09-15T22:29:33.777Z (almost 2 years ago)
- Language: Python
- Homepage:
- Size: 266 KB
- Stars: 17
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Linear Optimal Low Rank Projection (lollipop :lollipop:)

[](https://arxiv.org/abs/1709.01233)
[](https://pypi.org/project/lolp/)


[](https://travis-ci.org/neurodata/lollipop)
# Overview
Supervised learning techniques designed for the situation when the dimensionality exceeds the sample size have a tendency to overfit as the dimensionality of the data increases. To remedy this High dimensionality; low sample size (HDLSS) situation, we attempt to learn a lower-dimensional representation of the data before learning a classifier. That is, we project the data to a situation where the dimensionality is more manageable, and then are able to better apply standard classification or clustering techniques since we will have fewer dimensions to overfit. A number of previous works have focused on how to strategically reduce dimensionality in the unsupervised case, yet in the supervised HDLSS regime, few works have attempted to devise dimensionality reduction techniques that leverage the labels associated with the data. In this package, we provide several methods for feature extraction, some utilizing labels and some not, along with easily extensible utilities to simplify cross-validative efforts to identify the best feature extraction method. Additionally, we include a series of adaptable benchmark simulations to serve as a standard for future investigative efforts into supervised HDLSS. Finally, we produce a comprehensive comparison of the included algorithms across a range of benchmark simulations and real data applications. (Credit: Eric Bridgeford)
For R implmentation, please [here](https://github.com/neurodata/lol).
# System Requirements
## Hardware Requirements
- **lolP** package requires only a standard computer with enough RAM to support the in-memory operations.
- Requires no non-standard hardware to run.
## Software Requirements
- **lolP** was developed in Python 3.6. Currently, there is no plan to support Python 2.
- Was developed and tested primarily on Mac OS (Sierra 10.12.6).
- **lolP** package should be compatible with Windows, Mac, and Linux operating systems.
- **lolP** is robust to Python package versions as it only requires the following packages:
```
numpy
scikit-learn
scipy
```
# Installation Guide
## Stable Release
`lolP` is available on PyPi:
```
pip install lolP
```
# Demo
The **lolP** package offers identical API to that of scikit-learn. Thus, if you have used scikit-learn,
you will find the usage very familiar. Below is a very simple demo on the usage of **lolP**.
```
from lol import LOL
import numpy as np
# Generate two random datasets
# 100 samples, 10 dimensions
X = np.random.rand(100, 10)
X2 = np.random.rand(100, 10)
# Two classes with equal proportions
y = np.random.binomial(1, 0.5, size=100)
lmao = LOL(n_components=4, svd_solver='full')
lmao.fit(X, y)
X2_transformed = lmao.transform(X2)
```