Is there a known issue compiling the stats toolbox?
조회 수: 1 (최근 30일)
이전 댓글 표시
We're compiling our code as a standalone program, and getting it working has been tricky. From trial and error, we've isolated the problem to a single call to a function in the statistics and machine learning toolbox ('fitcnb'). If I comment out this single line, the code compiles and the program runs; if I don't comment it out, the code compiles but crashes at runtime.
I've seen a couple other questions with issues when compiling the stats toolbox. (Question 1) (Question 2) The only resolution seems to be creating custom functions and avoiding the stats toolbox. This is fine if the functions are simple, but in our case it's a machine learning classifier, and I'd rather not re-write that.
From the current documentation, the stats toolbox is completely supported. However that doesn't seem to be the case. Is this either a known issue with the stats toolbox?
We're using Matlab 2016a, Matlab compiler 9, and OSx 10.11.3.
Edit: To reproduce the error on my machine, I do the following:
% compile the standalone
mcc -m callStatsToolbox.m
% attempt to run the standalone
!./run_callStatsToolbox.sh /Applications/MATLAB/MATLAB_Runtime/v901/
where callStatsToolbox.m is the following function:
function callStatsToolbox()
XX = rand(10^4,5); % make some random data
yy = rand(10^4,1)>0.5; % make random labels
naive_bayes_model = fitcnb(XX,yy);
[predicted_class, score] = predict(naive_bayes_model,XX);
disp('It worked!')
댓글 수: 4
Walter Roberson
2017년 4월 24일
I took the callStatsToolbox code you posted, and packaged it using Application Compiler, on OS-X El Capitan and R2017a. The only change I made was to convert the disp('It worked!') to a uiwait(msgbox('It worked!')) . There was no difficulty in the building or execution.
답변 (1개)
Image Analyst
2017년 4월 24일
Did you look in mccExcludedFiles.log?
Have you sent the crash log into the Mathworks? They will help you figure out what is crashing the app if you have a current maintenance contract with them.
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!