Code Monkey home page Code Monkey logo

stats's Introduction

Stats

Quickly create random variables for common distributions and export to csv or json.

Installation

pip3 install .

Example

Using random variables as arguments and in equations:

stats random -i "x ~ poisson(2); y ~ exp(x); z = x * y;" --output csv --nreps 10 --decimals 3

x,y,z
2,3.964,7.927
1,1.709,1.709
2,0.322,0.644
3,4.033,12.098
2,3.485,6.971
2,3.141,6.283
0,0.0,0.0
0,0.0,0.0
1,0.045,0.045
4,2.617,10.469

Piping to plot:

stats random -i "x ~ norm(15, 3); y ~ norm(10, 1); z = x * y;" --output csv --nreps 1000 --decimals 3 
   | tail -n+2 
   | awk -F "," '{print $3}' 
   | feedgnuplot --histogram 0 --binwidth 15

plot

From file:

stats random -f examples/roi.example | tail -n+2 | awk -F "," '{print $NF}' | feedgnuplot --histogram 0 --binwidth 10000

image

stats's People

Contributors

natefduncan 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.