A package for optimization solvers
Project description
elex-solver
This packages includes solvers for:
- Quantile regression
- Transition matrices
Installation
- We recommend that you set up a virtualenv and activate it (IE
mkvirtualenv elex-solver
via http://virtualenvwrapper.readthedocs.io/en/latest/). - Run
pip install elex-solver
Quantile Regression
Since we did not find any implementations of quantile regression in Python that fit our needs, we decided to write one ourselves. This uses cvxpy
and sets up quantile regression as a normal optimization problem. We use quantile regression for our election night model.
Transition matrices
We also have a solver for transition matrices. While this works arbitrarily, we have used this in the past for our primary election night model. We can still use this to create the sankey diagram coefficients.
Development
We welcome contributions to this repo. Please open a Github issue for any issues or comments you have.
Set up a virtual environment and run:
> pip install -r requirements.txt
> pip install -r requirements-dev.txt
Precommit
To run pre-commit for linting, run:
pre-commit run --all-files
Testing
> tox
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file elex-solver-1.1.0.tar.gz
.
File metadata
- Download URL: elex-solver-1.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc07caf900998cee63d1f6b63951b94e2514c6a82e601d80f93a46a8003c79c6 |
|
MD5 | e666720022c8b0516aa18d85ea411755 |
|
BLAKE2b-256 | 2929bb7bf2f32e6cf6980e93b65aee848298a2a2e5ded7ba9333b22a664704f8 |
File details
Details for the file elex_solver-1.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: elex_solver-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fb2d6328078d54f1d019959366871119b8dbed869daa89b7bee87725ddbada3 |
|
MD5 | a58fd6cb09cd4ce64775cc5fc12da8ad |
|
BLAKE2b-256 | 80087660c8d0dddd1afb6cbbfb9121b7b6aa918e08d8085de4cf50f53a63c0c8 |