Giter Site home page Giter Site logo

decisiontable's Introduction

Tree-based-domain decision table

Build Status

Decision tables are a concise visual representation for specifying which actions to perform depending on given conditions wikipedia.

outlook temperature precipitation wind outcome
any unbearable any any don't play
overcast any any stormy don't play
sunny positive any calm play
any positive showers any don't play
Default play

The columns in such table represent decision domains. Cells represent a predicate about such domain. This should be a node in the domain representation tree:

outlooks temperatures precipitations winds
  • ANY
    • Clear
    • Cloudy
    • Overcast
  • ANY
    • Negative
      • Fresh (>-10˚)
        • -1˚
        • -2˚
        • ...
      • freezing (-10˚‑ -20˚)
      • unbearable (<20˚)
    • Positive
      • cold (<+10˚)
      • comfortable (+10˚‑ +20˚)
      • warm (+10˚‑ +20˚)
      • hot (+20˚‑ +30˚)
      • smelting (>+30˚)
  • ANY
    • Rainy
      • SHOWERS

        • MODERATE
        • HEAVY
        • FLOOD
      • LIGHT

    • SNOWY
      • LIGHT
      • MODERATE
      • STORM
    • NONE
  • ANY
    • Calmy
      • Calm
      • Light air
    • Breeze
      • Light
      • Gentle
      • Moderate
      • Fresh
      • Strong
    • gale
      • moderate
      • fresh
      • Strong
    • Stormy
      • whole gale
      • Violent storm
      • Hurricane force

So we can always test with some exact (leaf in the tree) conditions:

  1. overcast, +17˚C, light showers, light breeze – results in "don't play" since the 4th line
  2. sunny, +5˚C, heavy showers, calm – results in "play" despite line 4, since matches line 3

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.