Giter VIP home page Giter VIP logo

rpi-wcl / pilots Goto Github PK

View Code? Open in Web Editor NEW
7.0 14.0 5.0 18.02 MB

PILOTS (ProgrammIng Language for spatiO-Temporal data Streaming applications)

Home Page: http://wcl.cs.rpi.edu/pilots/

Java 87.85% Batchfile 0.20% HTML 6.68% Python 4.05% Shell 0.13% C 1.09%
programming-language stream-processing machine-learning error-signatures declarative-programming data-driven-model pilots pilots-grammar pilots-programs

pilots's Introduction

PILOTS ver 0.6

PILOTS (ProgrammIng Language for spatiO-Temporal data Streaming applications) is a highly declarative programming language for spatio-temporal streaming applications. It is capable of detecting and correcting data errors through user-defined error signatures.

PILOTS has been successfully applied to avionics applications. Most notably, we have shown that PILOTS can fix data errors caused by pitot tube sensor failures which occurred in Air France Flight 447 accident. For more information, visit the PILOTS web site and look at related papers.

Note: The following commands shown for the command line are assumed to be implemented in the bash shell

0. Prerequisite Knowledge

Basics of using a terminal Installing programs for use on the terminal

1. Software Requirements

  • Java JDK 1.8 or newer.
  • Bash shell to run example PILOTS programs.
  • (Optional) JavaCC if you want to modify the PILOTS grammar. For machine learning component of PILOTS:
  • Python 3
  • Python libraries: numpy, scipy, scikit-learn, pickle, and flask Using pip they can be installed using the following line:
pip3 install numpy scipy scikit-learn pickle flask

2. Downloading PILOTS Library

3. Getting Started with PILOTS

  • Setting environment variables / aliases

    • In .bashrc, set the PILOTS_HOME environment variable to store the directory containing this README (i.e., root directory of the PILOTS installation). For example, if this README is installed in /home/user/software/pilots, an export command to set PILOTS_HOME looks as follows:
    export PILOTS_HOME=/home/user/software/pilots
    

    Note that the directory containing this README is referred to as $PILOTS_HOME hereafter.

    • Followed by the above export command for PILOTS_HOME, set the following CLASSPATH environment variable and compiler command aliases in .bashrc:
    export CLASSPATH=.:$PILOTS_HOME/lib/*
    alias plc='java pilots.compiler.PilotsCompiler'
    alias plcsim='java pilots.compiler.PilotsCompiler --sim'
    alias pltserver='$PILOTS_HOME/pilots/util/model/server.sh'
    
  • Building a PILOTS jar file

    In $PILOTS_HOME, run

    $ ./build.sh
    

    pilots.jar will be created under the $PILOTS_HOME/lib directory.

4. Running a PILOTS program

  • First read about PILOTS in the wiki
  • Follow along the README in a simple program: Twice, Twice Sim
  • Try some other programs Aoacheck

5. Running a PILOTS program with machine learning

In PILOTS, the model function is a function which uses a machine learning model to generate an output based on a given input.

pilots's People

Contributors

agalli93 avatar djglowny avatar imais avatar keyboardnerd avatar klockr avatar mychoco avatar sinclairgurny avatar wennanzhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pilots's Issues

Remove usage of java -cp everywhere

Instead of using java -cp in the example files to compile the generated java files, it's easier to set up the java class path directly in setenv file.

machine learning engine execution error

This error occurs on Ubuntu 14.04.5 with Python version 2.7.10. When attempting to execute:

python engineIO.py definitions/bayes_config.json

from pilots/util/learningmodel/engine on the learn_dev branch as an example of using the machine learning engine, the following error output message occurs:

Traceback (most recent call last):
  File "engineIO.py", line 100, in <module>
    env = train_model(json_file)
  File "engineIO.py", line 14, in train_model
    return _load(json_file_name)
  File "engineIO.py", line 87, in _load
    read_model(env, json_dict[K.M])
  File "engineIO.py", line 57, in read_model
    env.feature = env.transform(baseenv.BaseEnv.data_transformer, schema=env.get_schema_info(), constant=env.get_constant(), definition=json_dict[K.A_FEATURES])
  File "/home/glownd/Documents/PILOTS_research/git_repos/pilots/pilots/util/learningmodel/engine/scbase/baseenv.py", line 125, in transform
    return transformer(self.data, **parameters)
  File "/home/glownd/Documents/PILOTS_research/git_repos/pilots/pilots/util/learningmodel/engine/scbase/baseenv.py", line 196, in data_transformer
    X = np.apply_along_axis(def_transformer, 1, npmatrix)
  File "/usr/local/lib/python2.7/dist-packages/numpy/lib/shape_base.py", line 91, in apply_along_axis
    res = func1d(arr[tuple(i.tolist())], *args, **kwargs)
  File "<string>", line 1, in <lambda>
  File "/usr/local/lib/python2.7/dist-packages/numpy/matrixlib/defmatrix.py", line 318, in __getitem__
    out = N.ndarray.__getitem__(self, index)
IndexError: index 3 is out of bounds for axis 0 with size 1

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.