https://github.com/jakevdp/lpproj
Scikit-learn compatible Locality Preserving Projections in Python
https://github.com/jakevdp/lpproj
Last synced: 3 months ago
JSON representation
Scikit-learn compatible Locality Preserving Projections in Python
- Host: GitHub
- URL: https://github.com/jakevdp/lpproj
- Owner: jakevdp
- License: bsd-3-clause
- Created: 2016-01-11T20:53:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-15T09:33:53.000Z (almost 7 years ago)
- Last Synced: 2025-04-15T01:05:03.229Z (3 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 495 KB
- Stars: 93
- Watchers: 7
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Locality Preserving Projections in Python
This is a Python implementation of Locality Preserving Projections (LPP), compatible with scikit-learn.
[](https://pypi.python.org/pypi/lpproj)
[](https://pypi.python.org/pypi/lpproj)
[](https://travis-ci.org/jakevdp/lpproj)
[](https://github.com/jakevdp/lpproj/blob/master/LICENSE)## Installation and Use
This package is pure Python, and depends only on [numpy](http://numpy.org/), [scipy](http://scipy.org/), and [scikit-learn](http://scikit-learn.org/).
The released version can be installed via pip:$ pip install lpproj
A basic example of its use can be found in [Example.ipynb](Example.ipynb); the library follows scikit-learn's patterns for ``fit()``, ``transform()``, and ``fit_transform()``. The simplest example for a feature matrix ``X``:
```python
from lpproj import LocalityPreservingProjection
lpp = LocalityPreservingProjection(n_components=2)X_2D = lpp.fit_transform(X)
```## More Information
For information on the LPP algorithm, see the paper, [Locality Preserving Projections (pdf)](http://papers.nips.cc/paper/2359-locality-preserving-projections.pdf).