Skip to main content

Discretized Interpretable Multi Layer Perceptron (DIMLP) and related algorithms

Project description

dimlpfidex build

Discretized Interpretable Multi Layer Perceptron (DIMLP) and related algorithms

Installation

pip install dimlpfidex

Contribution

Get the project code

To get the latest source code, install git and clone the repository:

$ git clone https://github.com/HES-XPLAIN/dimlpfidex.git

To download the required dependencies on your system, run:

$ git submodule init
$ git submodule update

Install C++ toolchain

Linux, macOS, Windows/WSL

Install with your package manager:

  • a C++ compiler (gcc/g++)
  • the ninja build system (ninja or ninja-build)
  • cmake

Windows

[!TIP] Consider using Windows/WSL instead.

winget install Microsoft.VisualStudio.2022.Community

The MSVC compiler is necessary for proper packaging of the bindings.

winget install Kitware.CMake

Ensure cmake.exe is accessible in the $PATH environment variable.

cmake.exe --version

[!NOTE] You will have to restart your computer for the changes to take effect.

Install Python

Install Python, version 3.9 or newer (3.11 is recommended):

  • Linux, macOS, Windows/WSL: Use your package manager to install python3 and python3-dev
  • Windows: winget install Python.Python.3.11

[!WARNING] On Windows, avoid installing Python through the Microsoft Store as the package has additional permission restrictions.

Install Python dependencies

Using pip

python -m venv .venv
source .venv/bin/activate
pip install .

[!NOTE] On Windows, use .venv\Scripts\activate instead.

Work with virtualenv

To activate the virtualenv, use the standard methods:

  • Unix: source .venv/bin/activate
  • Windows: .venv\Scripts\activate

To leave the virtualenv, use deactivate.

Add dependencies

To add new dependencies to the project, add them to the pyproject.toml file. To add them to the virtualenv, use:

pip install .

Install Pre-commit hooks

Git hooks are used to ensure quality checks are run by all developers every time before a commit.

Install with pip install pre-commit.

To enable pre-commit:

pre-commit install

Pre-commit hooks can be run manually with:

pre-commit run --all-files

Compile

Compile:

mkdir build && cd build
cmake ..
cmake --build .

[!NOTE] On Windows, you may have to use cmake -DCMAKE_PREFIX_PATH="C:\<absolute\path\to>\.venv" .. instead.

[!TIP] To speed up the compilation process, you can also add -j X with X being your number of CPU cores.

[!WARNING] If you need to rebuild the project, you must erase the content of the build/ directory.

Package

Create archives for distribution, from the root of the project:

python -m build

Documentation

Install Doxygen:

  • Linux, macOS, Windows/WSL: Use your package manager to install doxygen
  • Windows: winget install DimitriVanHeesch.Doxygen

Create the documentation:

mkdir build && cd build
cmake -DBUILD_DOCUMENTATION=ON ..
cmake --build .

The generated HTML documentation will be found in build/docs/sphinx.

Release

To publish the package on PyPI, refer to RELEASE.

Credits

Our test suite is using Obesity or CVD risk dataset from AravindPCoder (under CC BY-SA 4.0 license)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dimlpfidex-1.0.1.tar.gz (8.7 MB view hashes)

Uploaded Source

Built Distributions

dimlpfidex-1.0.1-cp312-cp312-win_amd64.whl (632.6 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

dimlpfidex-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (900.1 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

dimlpfidex-1.0.1-cp312-cp312-macosx_14_0_arm64.whl (921.0 kB view hashes)

Uploaded CPython 3.12 macOS 14.0+ ARM64

dimlpfidex-1.0.1-cp311-cp311-win_amd64.whl (632.3 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

dimlpfidex-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (900.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

dimlpfidex-1.0.1-cp311-cp311-macosx_14_0_arm64.whl (923.1 kB view hashes)

Uploaded CPython 3.11 macOS 14.0+ ARM64

dimlpfidex-1.0.1-cp310-cp310-win_amd64.whl (629.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

dimlpfidex-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (897.7 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

dimlpfidex-1.0.1-cp310-cp310-macosx_14_0_arm64.whl (920.0 kB view hashes)

Uploaded CPython 3.10 macOS 14.0+ ARM64

dimlpfidex-1.0.1-cp39-cp39-win_amd64.whl (629.8 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

dimlpfidex-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (898.0 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

dimlpfidex-1.0.1-cp39-cp39-macosx_14_0_arm64.whl (920.1 kB view hashes)

Uploaded CPython 3.9 macOS 14.0+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page