/MLProject

Project for the Machine Learning course

Primary LanguageC++

Neuradillo

For the Machine Learning course, we developed a library to build and train feedforward neural networks in C++ exploiting Armadillo numerical library. The main implemented techniques are gradient descent with backpropagation, k-fold cross-validation and grid-search (parallel and sequential). Multiple activation functions are available (sigmoid, tanh, relu and linear). We tested our library on Monks datasets and on a specific dataset given by the professor. All the tests were made with different models using one to five hidden layers. More information about the project and the algorithms we implemented can be found in the report.

Getting started

Prerequisites

The project use Cmake 3.16 as building system and it can be downloaded here. The package manager used is Conan. You can install it with the following commands: pip install conan

Running the following command to solve this issue: source ~/.profile

Armadillo installation

  1. Clone the following repo: https://github.com/darcamo/conan-armadillo;
  2. Inside the cloned repo run: conan create . armadillo/stable
  3. If Armadillo is installed correctly an example program is execute and you can start use it through Conan.

Running the project

If CMake and Armadillo were installed correctly you have to create a directory where cmake store the configuration files needed to run the project: mkdir build && cd build

Inside the build folder to generate the files that are needed by Conan type: conan install ..

Then the for the CMake files give: cmake ..

In the end to build the project type: cmake --build .

If all the process is done correctly a /bin folder is created with a binary file inside. This file can be executed with: ./MLProject

The error of the training set and validation set is print during the execution.

Results

Here we show a learning curve plot we obtained during the training phase.

Future works

Authors