Code Monkey home page Code Monkey logo

pop-de's People

Stargazers

Ricardo Rodríguez avatar

Watchers

Thomas Dent avatar Jam Sadiq avatar  avatar

Forkers

jamsadiq

pop-de's Issues

Allow for transformation and rescaling of input data

Allow options for initialising the class to transform the input data variables, eg take log of one of more dimensions, and perform rescaling by a constant factor for each dimension after transformation. Store both the original and transformed/rescaled data and allow for evaluating the KDE over either.

Edited : Considering #14 , it is preferable to separate any transformation functions from rescaling which we may want to do after standardization / immediately before fitting the KDE. (Specifically, rescaling before standardization has no effect.)

Standardization of data

New methods of the basic simple KDE.
To keep track of dimensions with different units/orders of magnitude etc., calculate the standard deviation along each dimension (after applying a possible transformation function as in #7), store and then calculate standardized data, ie data with each dimension divided by its std.

The basic KDE fit method should then have an option/argument to use the standardized data or not. The difference will be in how the bandwidth is applied (ie do the units of the bandwidth correspond to the data, or the standardized data).

Implement adaptive KDE via kdepy

Add a class in a new module, as a subclass of the KDEpy basic estimate (or of the existing variable bandwidth KDE class), to implement a general adaptive KDE. It will evaluate an initial 'pilot' KDE (with fixed scalar bandwidth) at the data point positions. It will then calculate per-point bandwidths via some formula based on the pilot KDE values (eg the Wang & Wang formula at https://github.com/mennthor/awkde/tree/master). Its main evaluation method will use the per-point bandwidths.

Add plotting module & plot methods in the KDE classes

A plotting module can include convenience functions for labelling axes, setting up grids of points, identifying slices (values at points in space defined by a given constant parameter value), integrating (/marginalizing) a KDE over one or more variables etc.

The basic structure is for the main density estimate module to import functions or other objects from the plotting module so that plotting methods can be coded concisely

Add plotting module & plot methods in the KDE classes

A plotting module can include convenience functions for labelling axes, setting up grids of points, identifying slices (values at points in space defined by a given constant parameter value), integrating (/marginalizing) a KDE over one or more variables etc.

The basic structure is for the main density estimate module to import functions or other objects from the plotting module so that plotting methods can be coded concisely for the classes

Transform KDE in kde_data variables back to original variables

At present the KDE values are in variables (coordinates) determined by self.kde_data : i.e. the KDE is a density over a space defined in specific coordinates. In general these will not be physically useful or meaningful units.

So, make the required inverse transformations in the density to convert it to the units of self.transf_data ('transformed data units') and then also to self.data ('original data units').

This is probably best done by adding new methods to the basic density estimate class ('SimpleKernelDensityEstimation') which take an array of KDE values and transform it from kde_data units to the desired ones.

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.