Giter Club home page Giter Club logo

distextension's Introduction

The dist extension for NetLogo makes it easy to plot frequency distributions and complementary cumulative distribution functions in NetLogo.

The extension is still very raw and hasn't been fully tested. Don't use it in production code.

Download it from the Releases page.

The latest version of the extension should work with NetLogo 6.0.2.


dist:frequencies values log-x? log-y?

Reports a list of pairs, where the first element of the pair is a value and the second element is the frequency of that value in the values list. Values must be integers. Those that aren't are truncated (not rounded).

The log-x? and log-y? arguments are booleans allowing one or both elements of the pair to be reported as base 10 logarithms.

Examples:

observer> show dist:frequencies [1 1 1 2 2 3] false false
observer: [[0 0] [1 3] [2 2] [3 1]]
observer> show dist:frequencies [1 1 1 2 2 3] true true
observer: [[0 0.47712125471966244] [0.3010299956639812 0.3010299956639812] [0.47712125471966244 0]]

dist:ccdf values log-x log-y

Reports a list of pairs, corresponding to points in an complementary cumulative distribution function. Values can be floating point numbers.

The log-x? and log-y? arguments are booleans allowing one or both elements of the pair to be reported as base 10 logarithms.

Example:

observer> show dist:ccdf [1 1 1 2 2 3] false false
observer: [[1 1] [2 0.5] [3 0.16666666666666666]]
observer> show dist:ccdf [1 1 1 2 2 3] true true
observer: [[0 0] [0.3010299956639812 -0.3010299956639812] [0.47712125471966244 -0.7781512503836436]]

dist:plot-points points

The dist:plot-points command could be used with any list of points expressed as pairs, but it is especially convenient for using with dist:frequencies and dist:ccdf.

For example:

dist:plot-points dist:ccdf [ number-of-citations ] of scientists true true

Could result in:


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.