Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug in random forest compilation solved
- Loading branch information
1 parent
cf68050
commit c8f91a5
Showing
10 changed files
with
120 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
% ******************************************************************** | ||
% * mex File compiling code for Random Forest (for linux) | ||
% * mex interface to Andy Liaw et al.'s C code (used in R package randomForest) | ||
% * Added by José Ignacio Orlando ( jiorlando@conicet.gov.ar ) | ||
% ********************************************************************/ | ||
function compile_random_forest | ||
|
||
% prepare folder were the object files are contained | ||
archstr = computer('arch'); | ||
|
||
if ispc() | ||
|
||
if strcmp(archstr(end-1:end), '32') | ||
% Compile the object file (if it does not exist) | ||
if exist('precompiled_rfsub/win32/rfsub.o', 'file')==0 | ||
mex -outdir precompiled_rfsub/win32 -c src/rfsub.f | ||
end | ||
mex -DMATLAB -output mexClassRF_train src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/win32/rfsub.o src/mex_ClassificationRF_train.cpp src/rfutils.cpp | ||
mex -DMATLAB -output mexClassRF_predict src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/win32/rfsub.o src/mex_ClassificationRF_predict.cpp src/rfutils.cpp | ||
else | ||
% Compile the object file (if it does not exist) | ||
if exist('precompiled_rfsub/win64/rfsub.o', 'file')==0 | ||
mex -outdir precompiled_rfsub/win64 -c src/rfsub.f | ||
end | ||
mex -DMATLAB -output mexClassRF_train src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/win64/rfsub.o src/mex_ClassificationRF_train.cpp src/rfutils.cpp | ||
mex -DMATLAB -output mexClassRF_predict src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/win64/rfsub.o src/mex_ClassificationRF_predict.cpp src/rfutils.cpp | ||
end | ||
|
||
elseif isunix() | ||
|
||
if strcmp(archstr(end-1:end), '32') | ||
% Compile the object file (if it does not exist) | ||
if exist('precompiled_rfsub/linux32/rfsub.o', 'file')==0 | ||
mex -outdir precompiled_rfsub/linux32 -c src/rfsub.f | ||
end | ||
mex -DMATLAB -output mexClassRF_train src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/linux32/rfsub.o src/mex_ClassificationRF_train.cpp src/rfutils.cpp | ||
mex -DMATLAB -output mexClassRF_predict src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/linux32/rfsub.o src/mex_ClassificationRF_predict.cpp src/rfutils.cpp | ||
else | ||
% Compile the object file (if it does not exist) | ||
if exist('precompiled_rfsub/linux64/rfsub.o', 'file')==0 | ||
mex -outdir precompiled_rfsub/linux64 -c src/rfsub.f | ||
end | ||
mex -DMATLAB -output mexClassRF_train src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/linux64/rfsub.o src/mex_ClassificationRF_train.cpp src/rfutils.cpp %-lm -DMATLAB -O -lgfortran | ||
mex -DMATLAB -output mexClassRF_predict src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/linux64/rfsub.o src/mex_ClassificationRF_predict.cpp src/rfutils.cpp | ||
end | ||
|
||
elseif ismac() | ||
|
||
if strcmp(archstr(end-1:end), '32') | ||
% Compile the object file (if it does not exist) | ||
if exist('precompiled_rfsub/mac32/rfsub.o', 'file')==0 | ||
mex -outdir precompiled_rfsub/mac32 -c src/rfsub.f | ||
end | ||
mex -DMATLAB -output mexClassRF_train src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/mac32/rfsub.o src/mex_ClassificationRF_train.cpp src/rfutils.cpp | ||
mex -DMATLAB -output mexClassRF_predict src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/mac32/rfsub.o src/mex_ClassificationRF_predict.cpp src/rfutils.cpp | ||
else | ||
% Compile the object file (if it does not exist) | ||
if exist('precompiled_rfsub/linux64/rfsub.o', 'file')==0 | ||
mex -outdir precompiled_rfsub/mac64 -c src/rfsub.f | ||
end | ||
mex -DMATLAB -output mexClassRF_train src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/mac32/rfsub.o src/mex_ClassificationRF_train.cpp src/rfutils.cpp | ||
mex -DMATLAB -output mexClassRF_predict src/classRF.cpp src/classTree.cpp src/cokus.cpp precompiled_rfsub/mac32/rfsub.o src/mex_ClassificationRF_predict.cpp src/rfutils.cpp | ||
end | ||
|
||
end | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=mex 2017.10.12) 27 OCT 2017 11:31 | ||
entering extended mode | ||
restricted \write18 enabled. | ||
%&-line parsing enabled. | ||
**mex_ClassificationRF_train.cpp classRF.cpp classTree.o rfutils.o rfsub.o coku | ||
s.o -o mexClassRF_train -lgfortran -lm -DMATLAB | ||
|
||
! Emergency stop. | ||
<*> mex_ClassificationRF_train.cpp | ||
classRF.cpp classTree.o rfutils.o rfsub.o... | ||
End of file on the terminal! | ||
|
||
No pages of output. |