Skip to content

Python package to quickly develop spectral XAI models

Notifications You must be signed in to change notification settings

i-bec-org/spectra-xai

Repository files navigation

Build Status Issues License


Logo

eXplainable Artificial Intelligence for spectral datasets

An awesome python library to jumpstart your AI models!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

This library was developed to rapidly prototype and test various AI models across different spectral pre-treatments. It features:

  • Spectral pre-processing or pre-treatment
  • Dataset splitting into training and independent test sets
  • Model training and optimization of the algorithms' hyperparameters
  • Pre- and post-hoc explainability analysis including plotting of feature importance

(back to top)

Built With

A number of different open source python packages are used like:

Numpy Scikit Pandas

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

Note that the cubist dependency requires a C compiler; in a Debian-based OS one can install it via:

sudo apt install build-essential

Installation

  1. On a new conda environment or virtualenv run:

    git clone https://github.com/i-bec-org/spectra-xai
    cd spectra-xai && pip install .
    

    or run

    python setup.py install
    
  2. [Optional] To install the development packages (e.g., if you want to edit this library) use:

    pip install -e .[dev]
    

(back to top)

Usage

Some examples of the usage of this library may be found under the examples folder.

For more examples, please refer to the Documentation

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Use of pre-commit

Please note that a number of different pre-commit hooks are used to automatically keep the project in its proper state. If you wish to submit a pull request it's recommended to install pre-commit locally and run them, i.e.:

pre-commit run --all-files

Running tests

Tests may be run through command line by executing e.g.:

pytest --ignore=examples --doctest-modules --html=report.html --cov=. --cov-report=html

Building documentation

Documentation may be generated via:

pdoc --docformat numpy --math -o docs spectraxai

(back to top)

License

This project is licensed under the terms of the GNU General Public License v3.0 or later (GPL-3.0-or-later). See the LICENSES/ directory for the full license text and additional license information.

Some files (e.g., documentation) are licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC-BY-SA-4.0). These files are explicitly marked with their respective license headers.

(back to top)

Contact

Nikos Tsakiridis - [email protected]

(back to top)

Acknowledgments

This library was made possible through funding from the European Union as it was developed within the framework of several research projects, including:

  • EIFFEL (European Union’s Horizon 2020 research and innovation programme under Grant Agreement Νο 101003518)
  • Soils4Africa (European Union’s Horizon 2020 research & innovation programme under Grant Agreement No. 862900)
  • BACCHUS (European Union’s Horizon 2020 research and innovation programme under Grant Agreement No 871704)

(back to top)

About

Python package to quickly develop spectral XAI models

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages