MachineIntelligenceCore:Algorithms
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MachineIntelligenceCore:Algorithms Documentation
Language

![GitHub license](https://img.shields.io/github/license/IBM/mi-toolchain.svg)

![Build Status](https://travis-ci.com/IBM/mi-algorithms.svg?branch=master) ![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/IBM/mi-algorithms.svg?logo=lgtm&logoWidth=18) ![Total alerts](https://img.shields.io/lgtm/alerts/g/IBM/mi-algorithms.svg?logo=lgtm&logoWidth=18)

Description

A subproject of Machine Intelligence Core framework.

The project contains core types (sample, batch, matrix tensor) and tools (MNIST/CIFAR/STL/RawText importers, encoders etc.) useful when training different models and working with different problems.

Main modules

  • types - core types and classes (sample, batch, matrix, tensor, position2D, action2D etc.)
  • importers - data i/o classes, various data importers (MNIST, CIFAR, STL10, BMP, IBMFont, RawText etc.)
  • encoders - tools for changing data format from one to another (mostly from/to Matrix)
  • utils - few useful tools (random generator, timer, data collector)

Applications (tests)

  • char_encoder_test - examplary 1-of-k Char Encoder test application.
  • data_collector_test - program for testing data collector.
  • tensor_test - program for testing tensor functionality.

Unit tests

  • types/unit_tests_matrix – dense (Eigen-derived) matrix unit tests
  • types/unit_tests_matrix_array – dense array of matrices matrix unit tests
  • types/unit_tests_tensor – few unit tests of Tensor class

External dependencies

Additionally it depends on the following external libraries:

  • Boost - library of free (open source) peer-reviewed portable C++ source libraries.
  • Eigen - a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
  • OpenBlas (optional) - An optimized library implementing BLAS routines. If present - used for fastening operation on matrices.
  • Doxygen (optional) - Tool for generation of documentation.
  • GTest (optional) - Framework for unit testing.

Installation of the dependencies/required tools

On Linux (Ubuntu 14.04):

sudo apt-get install git cmake doxygen libboost1.54-all-dev libeigen3-dev

To install GTest on Ubuntu:

sudo apt-get install libgtest-dev

On Mac (OS X 10.14): (last tested on: Jan/22/2019)

brew install git cmake doxygen boost eigen

To install GTest on Mac OS X:

brew install --HEAD https://gist.githubusercontent.com/Kronuz/96ac10fbd8472eb1e7566d740c4034f8/raw/gtest.rb

MIC dependencies

Installation of all MIC dependencies (optional)

This step is required only when not downloaded/installed the listed MIC dependencies earlier.

In directory scripts one can find script that will download and install all required MIC modules.

git clone git@github.com:IBM/mi-algorithms.git
cd mi-algorithms
./scripts/install_mic_deps.sh ../mic

Then one can install the module by calling the following.

./scripts/build_mic_module.sh ../mic

Please note that it will create a directory 'deps' and download all sources into that directory. After compilation all dependencies will be installed in the directory '../mic'.

Installation of MI-Algorithms

The following assumes that all MIC dependencies are installed in the directory '../mic'.

git clone git@github.com:IBM/mi-algorithms.git
cd mi-algorithms
./scripts/build_mic_module.sh ../mic

Make commands

  • make install - install applications to ../mic/bin, headers to ../mic/include, libraries to ../mic/lib, cmake files to ../mic/share

Documentation

In order to generate a "living" documentation of the code please run Doxygen:

cd mi-algorithms
doxygen mi-algorithms.doxyfile
firefox html/index.html

The current documentation (generated straight from the code and automatically uploaded to github pages by Travis) is available at:

https://ibm.github.io/mi-algorithms/

Maintainer

tkornuta

![HitCount](http://hits.dwyl.io/tkornut/ibm/mi-algorithms.svg)