Giter VIP home page Giter VIP logo

statistics's Introduction

Program description

This program creates a probability tree (see Wikipedia) of white and black elements. White could be redundancy nodes and black the other nodes in an Elasticsearch cluster. For example:

Elasticsearch cluster with 16 nodes ( N=16) and redundancy 3 ( R=3 ), then we have white=3 and black=N-R=13.

This program creates a list with probabilities of cluster fail function or data loss. For example N=4 and R=2 => white=2, black=2. Sample output:

first argument=white and the second argument=black
sbt run 2 2
Depth: 2 with 0.16666666666666666
Depth: 3 with 0.5
Depth: 4 with 0.9999999999999999

=> Two nodes lost: 16,6% probability of cluster failure or data loss
=> Three nodes lost: 50% probability of cluster failure or data loss
=> Four nodes lost: 100% probability of cluster failure or data loss

Other Example with N=12 and R=3

sbt run 3 9
Depth: 3 with 0.004545454545454546
Depth: 4 with 0.01818181818181818
Depth: 5 with 0.04545454545454546
Depth: 6 with 0.09090909090909093
Depth: 7 with 0.15909090909090912
Depth: 8 with 0.2545454545454546
Depth: 9 with 0.3818181818181811
Depth: 10 with 0.5454545454545439
Depth: 11 with 0.7499999999999972
Depth: 12 with 0.9999999999999958

Build and run

git clone ...
sbt compile
sbt run 2 2

statistics's People

Contributors

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