Skip to main content

Python implementation of COBRA algorithm with regression analysis

Project description

Travis Status Coverage Status Python27 Python35

pycobra

Citation

If you are using pycobra, please consider citing the following papers:

  • Guedj and Srinivasa Desikan (2020), Kernel-based ensemble learning in Python. Information (webpage)

  • Guedj and Srinivasa Desikan (2018), Pycobra: A Python Toolbox for Ensemble Learning and Visualisation. Journal of Machine Learning Research (webpage)

  • Biau, Fischer, Guedj and Malley (2016), COBRA: A combined regression strategy. Journal of Multivariate Analysis (webpage)

All these references are included in the file pycobra.bib.

What is pycobra?

pycobra is a python library for ensemble learning. It serves as a toolkit for regression and classification using these ensembled machines, and also for visualisation of the performance of the new machine and constituent machines. Here, when we say machine, we mean any predictor or machine learning object - it could be a LASSO regressor, or even a Neural Network. It is scikit-learn compatible and fits into the existing scikit-learn ecosystem.

pycobra offers a python implementation of the COBRA algorithm introduced by Biau et al. (2016) for regression.

Another algorithm implemented is the EWA (Exponentially Weighted Aggregate) aggregation technique (among several other references, you can check the paper by Dalalyan and Tsybakov (2007).

Apart from these two regression aggregation algorithms, pycobra implements a version of COBRA for classification. This procedure has been introduced by Mojirsheibani (1999).

pycobra also offers various visualisation and diagnostic methods built on top of matplotlib which lets the user analyse and compare different regression machines with COBRA. The Visualisation class also lets you use some of the tools (such as Voronoi Tesselations) on other visualisation problems, such as clustering.

pycobra is described in the paper “Pycobra: A Python Toolbox for Ensemble Learning and Visualisation”, Journal of Machine Learning Research, vol. 18 (190), 1–5.

Documentation and Examples

The notebooks directory showcases the usage of pycobra, with examples and basic usage. The documentation page further covers how to use pycobra.

Installation

Run pip install pycobra to download and install from PyPI.

Run python setup.py install for default installation.

Run python setup.py test to run all tests.

Run pip install . to install from source.

Dependencies

  • Python 2.7+, 3.4+

  • numpy, scipy, scikit-learn, matplotlib, pandas, seaborn

References

  • B. Guedj and B. Srinivasa Desikan (2018). Pycobra: A Python Toolbox for Ensemble Learning and Visualisation. Journal of Machine Learning Research, vol. 18 (190), 1–5.

  • B. Guedj and B. Srinivasa Desikan (2020). Kernel-based ensemble learning in Python. Information, vol. 11(2).

  • G. Biau, A. Fischer, B. Guedj and J. D. Malley (2016), COBRA: A combined regression strategy, Journal of Multivariate Analysis.

  • M. Mojirsheibani (1999), Combining Classifiers via Discretization, Journal of the American Statistical Association.

  • A. S. Dalalyan and A. B. Tsybakov (2007) Aggregation by exponential weighting and sharp oracle inequalities, Conference on Learning Theory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pycobra-0.2.5-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file pycobra-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: pycobra-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for pycobra-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b442f5fa1722b8a5d54670c429e2a8301c4d841b1ed0400bf5febcf1d000a8c0
MD5 c794eed1babdc0d99e8ca714ec250647
BLAKE2b-256 64dfbc272906c987afd4be41422e94a4865ecbd4ab69c0a6230c3babde8768fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page