This is a Python package wrapper around the C solver for the l1 trend filtering algorithm written by Kwangmoo Koh, Seung-Jean Kim and Stephen Boyd. It is compatible with scikit-learn.
Documentation / Website: https://joshloyal.github.io/l1tf
Example that shows how to learn a one dimensional subspace from a dataset with ten features:
print("Hello, world!")
L1 Trend Filtering requires:
- Python (>= 2.7 or >= 3.4)
- NumPy (>= 1.8.2)
- SciPy (>= 0.13.3)
- Scikit-learn (>=0.17)
Additionally, to run examples, you need matplotlib(>=2.0.0).
You need a working installation of numpy and scipy to install L1 Trend Filtering. If you have a working installation of numpy and scipy, the easiest way to install l1tf is using pip
:
pip install -U l1tf
If you prefer, you can clone the repository and run the setup.py file. Use the following commands to get the copy from GitHub and install all the dependencies:
git clone https://github.com/joshloyal/l1tf.git cd l1tf pip install .
Or install using pip and GitHub:
pip install -U git+https://github.com/joshloyal/l1tf.git
After installation, you can use pytest to run the test suite via setup.py:
python setup.py test