Package: emllib
EMLlib - An Empirical Model Learning LibraryThis repository contains an implementation of techniques related toEmpirical 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:Using a Machine Learning (ML) model to approximate the input/output behavior of a system that is hard to model by conventional means.Embedding suchEmpirical Modelinto 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 methodsI/O support (in particular readers for popular ML libraries)The EML technique has been originally designed bythe 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 athttp://emlopt.github.io.Installationpip install emllibStructureIn details, every object in the EMLlib belongs to one of three groups:Core EML objectsare the classes and functions that implement the main EML functionalities, such as encodings, pre- and post-processing methodsBackendsprovide the interface the core EML objects with a specific optimization solverReadersallow to convert Machine Learning models built via popular frameworks in the internal formats used by the EMLlibThe repository is structured as follows:Thebackendmodule contains all the available backendsThebasesubmodule defines the interface that all backends should implementThe remaining submodules provide solver-specifc implementations of the base APIThenetandtreemodules contains classes and functions to work respectively with Machhine Learning models, and in particular Neural Network and Decision TreesThedescribesubmodule contains classes and functions that are useful torepresentML modelsTheembedsubmodule contains classes and functions that are useful toembedML models into a combinatorial modelTheprocesssubmodule contains classes and functions that are useful topre- and post-processML models for use optimizationThereadersubmodule contains specific reader implementationsTheutilmodule contains classes and functions used by multiple core EML objectsThe 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 APIIn order to have the core EML functionalities working you will need to:Obtain a Python 3.X distributionInstall numpy, e.g. via pip withpip3 install numpyAdd the main folder of your repository to your python path. This can be done by setting the globalPYTHONPATHvariables to include the path to this repositoryWe are planning to add a pip based installation in the coming months.Installing the Keras Network ReaderA reader for Neural Networks built with thekeras sequential APIis provided innet.reader.keras_reader.The reader itself does not require a specific installation, but you will need to installkerasto make it work.Installing the Sklearn Decision Tree ReaderA reader for Decision Trees built with thescikit-learnis provided intree.reader.sklearn_reader.The reader itself does not require a specific installation, but you will need to installscikit-learnto make it work.Installing the Cplex BackendA backend for theCPLEX Mixed Integer Linear Solveris provided inbackend.cplex_backend.The backend itself does not require a specific installation, but you will need to installdocplexto make it work.Documentationhttps://emlopt-doc.readthedocs.io/en/latest/#