Git Product home page Git Product logo

pydens's Introduction

Build Status

pydens, density estimation in python

pydens provides a unified interface to several density estimation packages, including an implementation of classifier-adjusted density estimation. Examples in the /notebooks directory include

Applications of density estimation include

  • Detecting data drift: The reliability of a trained model's prediction at a new data point depends on the similarity between the new point and the training data. A density function trained on the training data can serve as a warning of data drift if the evaluated density at the new point is exceptionally low. One way to focus such an analysis is to train and evaluate the density using only several of the most-important features in the model.
  • Mode detection: Locating regions of high density is a first step to efficiently allocate resources to address an epidemic, market a product, etc.
  • Feature engineering: The density at a point with respect to any subset of the dimensions of a feature space can encode useful information.
  • Anomaly/novelty/outlier detection: A "point of low density" is a common working definition of "anomaly", although it's not the only one. (In astrostatistics, for example, a density spike may draw attention as a possible galaxy.)

Evaluating the performance of a density estimator is not straightforward. We rely on a mix of simulation, real-data sanity checks, and cross-validation in special cases, as detailed in our evaluation guide.

Installation

Not yet on pypi or conda forge, but installation is still easy with pip:

pip install git+https://github.com/zkurtz/pydens.git#egg=pydens

License

MIT. See LICENSE.

Related work

Wishlist

Infrastructure:

  • expand code testing coverage
  • define new simulations

Tutorials, starting with

  • how CADE works
  • density estimation trees

Density estmation:

  • Implement a dimensionality-reduction pre-processing method. Extreme multicolinearly is a potential failure mode in CADE due to the feature independence assumption for the naive density estimate.
  • Merge the best of the tree-based methods of LightGBM, detpack, Schmidberger and Frank, and astropy.stats.bayesian_blocks.

pydens's People

Contributors

zkurtz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.