Skip to main content

Library fro Empirical Model Learning

Project description

EMLlib - An Empirical Model Learning Library

This repository contains an implementation of techniques related to Empirical Model Learning, a technique to enable Combinatorial Optimization and decision making over complex real-world systems. The method is based on the (relatively simple) idea of:

  1. Using a Machine Learning (ML) model to approximate the input/output behavior of a system that is hard to model by conventional means.
  2. Embedding such Empirical Model into a Combinatorial Optimization model.

The emphasis of EML is mostly on the techniques to perform the embedding. These should be designed so that the optimization engine can exploit the structure of the empirical model to boost the search process.

This repository includes:

  • Actual embedding techniques (encodings and global constraints)
  • Pre- and post- processing methods
  • I/O support (in particular readers for popular ML libraries)

The EML technique has been originally designed by the Artificial Intelligence group of the University of Bologna, but the repository implements also contributions from other groups.

The repository has been just launched and currently contains only a fraction of the existing techniques related to EML. In particular, we have published the bare minimum to support the EML tutorial at IJCAI 2018, and the current documentation is very scarce. More content (and improved documentation) will be released in the coming months.

The EMLlib is part of the EML resources (including the EML tutorial), all available at http://emlopt.github.io.

Installation

pip install emllib

Structure

In details, every object in the EMLlib belongs to one of three groups:

  • Core EML objects are the classes and functions that implement the main EML functionalities, such as encodings, pre- and post-processing methods
  • Backends provide the interface the core EML objects with a specific optimization solver
  • Readers allow to convert Machine Learning models built via popular frameworks in the internal formats used by the EMLlib

The repository is structured as follows:

  • The backend module contains all the available backends
    • The base submodule defines the interface that all backends should implement
    • The remaining submodules provide solver-specifc implementations of the base API
  • The net and tree modules contains classes and functions to work respectively with Machhine Learning models, and in particular Neural Network and Decision Trees
    • The describe submodule contains classes and functions that are useful to represent ML models
    • The embed submodule contains classes and functions that are useful to embed ML models into a combinatorial model
    • The process submodule contains classes and functions that are useful to pre- and post-process ML models for use optimization
    • The reader submodule contains specific reader implementations
  • The util module contains classes and functions used by multiple core EML objects

The core EML library is implemented in pure Python (3.X) and relies on very few additional modules. However, for every practical task you will need to use at least one backend, and probably at least one reader.

Installing the Core EML API

In order to have the core EML functionalities working you will need to:

  • Obtain a Python 3.X distribution
  • Install numpy, e.g. via pip with pip3 install numpy
  • Add the main folder of your repository to your python path. This can be done by setting the global PYTHONPATH variables to include the path to this repository

We are planning to add a pip based installation in the coming months.

Installing the Keras Network Reader

A reader for Neural Networks built with the keras sequential API is provided in net.reader.keras_reader.

The reader itself does not require a specific installation, but you will need to install keras to make it work.

Installing the Sklearn Decision Tree Reader

A reader for Decision Trees built with the scikit-learn is provided in tree.reader.sklearn_reader.

The reader itself does not require a specific installation, but you will need to install scikit-learn to make it work.

Installing the Cplex Backend

A backend for the CPLEX Mixed Integer Linear Solver is provided in backend.cplex_backend.

The backend itself does not require a specific installation, but you will need to install docplex to make it work.

Documentation

https://emlopt-doc.readthedocs.io/en/latest/#

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

emllib-1.0.2.tar.gz (25.8 kB view details)

Uploaded Source

Built Distributions

emllib-1.0.2-py3.8.egg (69.7 kB view details)

Uploaded Source

emllib-1.0.2-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file emllib-1.0.2.tar.gz.

File metadata

  • Download URL: emllib-1.0.2.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for emllib-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c59ab4e63546146d576fc45b37ba36a9b1a320abd50b174428f089d566cd1c92
MD5 f78ab5f6fc62d112a5605750f5ab1429
BLAKE2b-256 82da59a1d9078673a5c751dfe016802df78b6515b3a7fa2cac4724b5f191cfef

See more details on using hashes here.

File details

Details for the file emllib-1.0.2-py3.8.egg.

File metadata

  • Download URL: emllib-1.0.2-py3.8.egg
  • Upload date:
  • Size: 69.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for emllib-1.0.2-py3.8.egg
Algorithm Hash digest
SHA256 e5db2b1f887268d8f87c912a025920ca94a88a071f75e614f6d54d628ccd0ce4
MD5 959d0e79624d3eedab8bcc842dbdf381
BLAKE2b-256 0c49bd647c712064bfd15fdf204348b74742c4ec1229e6052f2051d626e6d65d

See more details on using hashes here.

File details

Details for the file emllib-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: emllib-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for emllib-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5e90f16f6b5198f056a1870ddcb75613dec3bba024979be0755cacc348785fd
MD5 0afe167c0a0f266fc535ad2756dcef27
BLAKE2b-256 45c17889bcd9f7508eb7f24b5fc51fdc7261237c165d1479ae6fd64c14d1aaa8

See more details on using hashes here.

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