A C++ program that performs classification using a Feed Forward Neural Network and returns the accuracy of the model
By default mlpack is installed to /usr/local/
, if you have installed somewhere specify that path.
export LD_LIBRARY_PATH="/usr/local/lib/:$LD_LIBRARY_PATH"
clang++ -L/usr/local/lib -l mlpack -l armadillo -l boost_serialization -l boost_program_options -I/usr/local/include FFN.cpp
The program takes two command line arguments
data.csv
- input data with last column as labelepochs
- number of epochs to train
./a.out <data.csv> <epochs>
- The given data is split into training and testing with a ratio of 80/20. Accuracy Score is reported from test data.
- Model is trained using a standard Gradient Descent optimizer and a log likelihood loss function