Munzekonza_random_forestinstallation guide
I. Installation environment
Ubuntu 14.04LTS,Matlab R2014a
II. Installation libraries
Library | Version | Remarks |
Boost | Boost1.55.0 | Boost is a set of libraries for the C++ programming language that provide support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. It contains over eighty individual libraries. |
Eigen | Eigen3 | Eigen is a high-level C++ library of template headers for linear algebra, matrix and vector operations, numerical solvers and related algorithms. Eigen is an open source library licensed under MPL2 starting from version 3.1.1. |
Gcc | Gcc4.7.3 | The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain. |
Mex file |
| In computing, MEX stands for MATLAB Executable and is a type of Computer file. A MEX-file (also written as MEX file) provides an interface between MATLAB or GNU Octave and subroutines written in C, C++ or Fortran. |
III. Installation steps
1. Matlabinstallation
There are notthat much things you want to see but to refer to the website as follows:
http://blog.csdn.net/lanbing510/article/details/41698285
2. Boostinstallation
Boost is awidely used library for C++, it is installed just like the other librariesexcept one point. That is if you need some libraries which must be compiledfirstly, you need to compile it. You can install it follow the steps in thebelow website:
http://blog.csdn.net/zhoudaxia/article/details/4292953
3. Eigen
Eigen is ahigh-level C++library of template headers for linearalgebra, matrix and vector operations, numerical solvers and related algorithms. Whatyou should know is that /usr/local/include should include the eigen includelibrary.
4. Mex
IV. Error
1.error127
june@june-Aspire-4741:~$ cd $REPO
june@june-Aspire-4741:~/projects/munzekonza_random_forest$ make all
/usr/local/MATLAB/R2014a/bin/util/mex CXXFLAGS='$CXXFLAGS -std=c++11 -O2'-I/home/june/apps/boost_1_55_0/include-I/home/june/apps/eigen-eigen-bdd17ee3b1b3/include/eigen3-I/home/june/projects/munzekonza_random_forest/src/cpp -L/home/june/apps/boost_1_55_0/lib-L/home/june/projects/munzekonza_random_forest/lib \
-lmunzekonza_parsing -lmunzekonza_debugging-lmunzekonza_utils -lmunzekonza_mex -lmunzekonza_random_forest-lmunzekonza_ncm_forest -lmunzekonza_numeric -lboost_system -lboost_filesystem-lboost_regex \
src/cpp/munzekonza/ncm_forest/procedures/train_ncm_tree.cpp \
-output/home/june/projects/munzekonza_random_forest/lib/+munzekonza/train_ncm_tree
make: execvp: /usr/local/MATLAB/R2014a/bin/util/mex: Permission denied
make: ***[/home/june/projects/munzekonza_random_forest/lib/+munzekonza/train_ncm_tree.mexa64]Error 127
Mex is included in matlab, and there areseveral mex folders. When set the mex path in Makefile.inc, we need to changeit to the mex.exe folder.
2.Mex fileentry point is missing.
>> munzekonza.ncm_forest_demo
train_data: single 12379 x 1000
train_labels: double 12379 x 1
test_data: single 1500 x 1000
test_labels: double 1500 x 1
nclasses: 10
Training tree 1...
Mex file entry point is missing. Please check the (case-sensitive)
spelling of mexFunction (for C MEX-files), or the (case-insensitive)
spelling of MEXFUNCTION (for FORTRAN MEX-files).
Error using munzekonza.train_ncm_tree
Invalid MEX-file
'/home/june/projects/munzekonza_random_forest/lib/+munzekonza/train_ncm_tree.mexa64':
Error in munzekonza.ncm_forest_demo (line 98)
[ tree, splits ] = munzekonza.train_ncm_tree( train_data,train_labels, sample_ids, rng_seed,
params );