Git Product home page Git Product logo

histweight's Introduction

HISTWEIGHT bins scattered data points defined in any dimension weighting them into uniform bins of specified granularity. Each data point has an associated intensity value which is spread to the neighbouring bins with a weight defined by three different methods (invsquared, diff or area). Limits of binning can be defined, different for each dimension. The granularity downsample the limits and increase the number of bins.

Examples of how the function works are depicted in the following figure. Granularity is set to 1 and area method is used for all of them.

  • 1-dimensional uniform points sampled from a sine wave with decreasing amplitude: sine_uniform
  • 2-dimensional random points with two different intensities: points_random
  • 2-dimensional random points sampled within a circle, with a larger intensity in a inner circle: circle_random
  • 3-dimensional uniform points sampled within a emisphere, with intensity increasing with the radius: emisphere_uniform

WHY HISTWEIGHT? The MATLAB function histcounts allows to bin scattered data points into quantiles and counts the number of points falling into each quantile. HISTWEIGHT improves histcounts by considering intensity values for each data point that are spread across the neighbouring quantiles. Note that in this way energy conservation is respected as the total sum of the intensity values associated to each point is equal to the total sum of the intensity values associated to each bin. This does not happen with MATLAB histcounts. THe following figures show a comparison of HISTWEIGHT against MATLAB histcounts using three different methods for a set of 10 randomly distributed points:

  • invsquared: inverse squared distance of each vertex with respect to the center of the bin invsquared
  • diff: 1 minus distance of each vertex with respect to the center of the bin, normalized over maximum distance diff
  • area: fractions of a square box centered into the point that fall into each neighbouring bins area

histweight's People

Contributors

andrepiz avatar

Stargazers

 avatar

Watchers

 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.