Coder Social home page Coder Social logo

gapt-d's Introduction

GaPT - Gaussian Process Toolkit for Online Regression

License

Please be aware that this code was originally implemented for research purposes and may be subject to changes and any fitness for a particular purpose is disclaimed. To inquire about commercial licenses, please contact Prof. Giuseppe Loianno ([email protected]).

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Overview:

GaPT is a novel toolkit that converts GPs to their state space form and performs regression in linear time.

  • GaPT is designed to be highly compatible with several optimizers popular in robotics GaPT is able to capture the system behavior in multiple flight regimes and operating conditions, including those producing highly nonlinear effects such as aerodynamic forces and rotor interactions.
  • GaPT has a faster inference time (processing sample rate) compared to a classical GP inference approach on both single and multi-input settings especially when considering large number of data points processed sample by sample (online).

Disclaimer: the repository is work in progress

That means we are working on uploading and upgrading all the functionalities. For now, it is intended to show the code which is the core of the GaPT Framework.

Recent Changes

  • 10/04/2022: First commit, the requirements and the setup.py file will be updated soon: the installation will be automated, now the file requirements.txt is just a freeze of the original virtual environment.
  • Upcoming updates: Installation procedure for desktop x86 devices and Nvidia ARM64 architecture devices.

Installation

The following installation procedure uses Anaconda3, that allow to create different and isolated python environments. If you don't have it, please see the installation guide: https://www.anaconda.com/products/distribution .

Create the environment

Go into the Installation folder and run the following command to create an empty environment config file.

conda create -n GAPT python=3.8

Before installing the required python packages, the environment must be activated.
NOTE: this action is required whenever you want to work with the desired environment.

Activate the environment:

conda activate GAPT

Install the requirements

Be sure to have the latest version of Pip and install the requirements.

pip install --upgrade pip
conda install -c conda-forge empy
pip install -r requirements.txt -f https://download.pytorch.org/whl/cpu/torch_stable.html

NOTE: this action must be performed from the installation folder and with the venv active.

Testing the installation:

The 'experiments' folder contains two subdirectories with the example code to use the GaPt and to perform some benchmarks. Note that each file needs the relative .json config file that can be passed as argument.

NOTE: this action must be performed from the Root folder of the repository and with the venv active.

To run the experiment, run the following command from the root of the project:

python -m experiments.<folder>.<experiments_name> -c <path_to_config_file>.json. 

For example to run the test for the SISO regression:

python -m experiments.drag.residual_arpl_siso -c experiments/drag/residual_arpl_siso.json

NOTE: If you run the code using and IDE (i.e. Pycharm) the paths in the .json config file may be changed using the absolute path and the path of the config file with the -c flag have to be included in the 'Parameter' field of the script configuration. SISO Regression scripts runs both ours toolboxes output and the standard Pytorch output for a comparison

The output of the scripts are in the /out foulder. They include the following

Foulder Name Contents
Configuration The parameter you used to run the python file
data_out the output of the data in the form of .csv
figures Figures demonstrating the output of the Toolbox.
Model A .pth file including the weights of the GaPT Model
Yaml A .yaml model file to export to ROS. Only SISO so far.
Acronyms Meaning
GT Ground Truth
Kf Toolbox Output
GPT GPytorch baseline output

gapt-d's People

Contributors

frankthecr0c avatar jm7752 avatar loiannog avatar alessandrosaviolo 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.