From 21cdfbca815894c3d3090cdd66f9005268b9690e Mon Sep 17 00:00:00 2001 From: lbvienna Date: Mon, 18 Sep 2023 22:16:17 -0400 Subject: [PATCH] updated readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a59d0739..fcd98ee0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # elex-solver This packages includes solvers for: +* Ordinary least squares regression * Quantile regression * Transition matrices @@ -9,8 +10,11 @@ This packages includes solvers for: * 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`` +## Ordinary least squares +We have our own implementation of ordinary least squares in Python because this let us optimize it towards the bootstrap by storing and re-using the normal equations. This allows for significant speed up. + ## 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`](https://www.cvxpy.org/#) and sets up quantile regression as a normal optimization problem. We use quantile regression for our election night model. +Since we did not find any implementations of quantile regression in Python that fit our needs, we decided to write one ourselves. At the moment this uses two libraries, the version that solves the non-regularized problem uses `numpy`and solves the dual based on [this](https://arxiv.org/pdf/2305.12616.pdf) paper. The version that solves the regularized problem uses [`cvxpy`](https://www.cvxpy.org/#) and sets up the problem as a normal optimization problem. Eventually, we are planning on replacing the regularized version with the dual also. ## 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.