Git Product home page Git Product logo

ogma-updated's Introduction

Ogma

We present Ogma, the first approach, which provides a systematic test framework for machine-learning systems that accepts grammar-based inputs. See the paper Grammar Based Directed Testing of Machine Learning Systems for more details

Teaser

Prerequisites

  • Python 2.7.15
  • numpy 1.14.5
  • scipy 1.1.0
  • scikit-learn 1.19.0

The authors used Pycharm CE 2017.2.3 as the development IDE.

Background

The Ogma approach is encapsulated in GramFuzz*.py. To run these files, you'll need a Context Free Grammar, a Jaccard Threshold and an API for your NLP service. You can look at the sample APIs in aylien_API.py, rosette_API.py and uclassify_API.py. Please run these with an example to see the type of inputs required of the output.

Organization

APIs

This folder consists of the APIs of the software used in the evaluationg of Ogma. We have specifically written the APIs such that the output of the get_label function for aylien_API.py, rosette_API.py and uclassify_API.py are standard.

Please create a file called API_KEYS.py and add your keys in the folowing format:

TEXTRAZOR_API_KEY = "<insert key here>"
UCLASSIFY_API_KEY_READ = "<insert key here>"
UCLASSIFY_API_KEY_WRITE = "<insert key here>"
AYLIEN_KEY = "<insert key here>"
AYLIEN_APP_ID = "<insert key here>"
ROSETTE_API_KEY = "<insert key here>"

Grammars

This folder contains .txt files of all the Grammars we have used in our experimentation.

Data Files

The main files containing all the data for our experiments.

MasterData

Positive Start

These folders are contain tests such that the first inputs is an error state

Negative Start

These folders are contain tests such that the first inputs is not an error state

Jaccard Threshold Variation

These folders are contain tests corresponding to varying the Jaccard Threshold as seen in RQ4 in the paper

These folders contains folders in the format <Classifier 1> <Classifier2> <Grammar> . Each folder has three files containing data of the experiments.

  • ErrorDataDirected - Inputs generated by Ogma
  • ErrorDataRandom - Inputs generated Randomly
  • ErrorDataNoBacktrack - Inputs generated by Ogma without backtracking

Data Plotting Scripts

This folder consists of scripts to reproduce the figures seen in the appendix of the paper.

There are two scripts in the folder, namely PlotData.py and PlotTime.py. These will consolidate the data into image form in the Plots folder. The PlotData.py script will plot the number of errors and the PlotTime.py script will plot the time taken.

Demo

python <filename>

eg. python GramFuzz_Rosette_uClassify.py

Contact

ogma-updated's People

Contributors

sakshiudeshi avatar

Watchers

James Cloos 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.