GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - quantregpy/quantregpy: A translation of the popular R library quantreg to python for quantile regression

BranchesTags
Open more actions menu

Latest commit

 

History

101 Commits
101 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
demo
demo
 
 
quantregpy
quantregpy
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
environment.yml
environment.yml
 
 
pyproject.toml
pyproject.toml
 
 
setup.py
setup.py
 
 

Repository files navigation

Update September 2021

Scikit Learn introduced version 1.0, and with it an implementation of quantile regression. Granted, there are some features that exist here that don't exist in Scikit Learn, it doesn't make much sense to keep working on this project in parallel. Development on this project is therefore suspended.

quantregpy

A translation of the popular R library quantreg (Authored by Roger Koenker) to python for quantile regression

**This library is very much experimental at this point.

Fortran code from the quantreg R package is modified to work with f2py

R code from the quantreg R package is translated into python, making heavy use of numpy.

The quantreg R package was accessed through github and distributed by GPL. I cannot overstate my gratitude for the original authors, some of whom are referenced as follows:

Koenker, R. (2017). Quantile regression in R: a vignette. Version of April, 17(2017), 88.

Esmond G. Ng and Barry W. Peyton, "Block sparse Cholesky algorithms on advanced uniprocessor computers". SIAM J. Sci. Stat. Comput. 14 (1993), pp. 1034-1056.

John R. Gilbert, Esmond G. Ng, and Barry W. Peyton, "An efficient algorithm to compute row and column counts for sparse Cholesky factorization". SIAM J. Matrix Anal. Appl. 15 (1994), pp. 1075-1091.

Koenker, R. (2005). Quantile Regression (Econometric Society Monographs). Cambridge: Cambridge University Press. doi:10.1017/CBO9780511754098

Koenker, R., Chernozhukov, V., He, X., & Peng, L. (Eds.). (2017). Handbook of quantile regression.

If this project matures, I will write better documentation. However, I am trying to mimic the R package, so their documentation should be useful

Installation

Dependencies: For windows and Linux, pip install works fine. For Macs, you may have some trouble, and will need a FORTRAN compiler.

pip install quantregpy

Sample usage

>>> import numpy as np
>>> from quantregpy.quantreg import rq
>>> import pandas as pd
>>> df = pd.DataFrame(dict(a=[1,2,3,4], y=[2,3,4,5]))
>>> out = rq("y ~ a", np.array([.5]), df)
>>> out
{'coefficients': array([1., 1.]), ... etc

About

A translation of the popular R library quantreg to python for quantile regression

Resources

Readme
GPL-3.0 license
Activity
Custom properties

Stars

6 stars

Watchers

3 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.